Knowing if a page is already liked on facebook [duplicate] - facebook

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to know if the user already like the page in Facebook Likebox?
Is there a way to know if a user likes the current page WITHOUT using asking the user for permissions?
The page has a like button and I am using the javascript to figure out when this button is clicked to show hidden content. However when the page is refreshed the button is shown as "liked" but the hidden content is still hidden.
Is there a javascript to know if the state of the facebook button is "Liked"?

Is there a javascript to know if the state of the Facebook button is
"Liked" without app authorization/authentication on my web page (not FB page tab)?
NO, this is not possible.

Related

Where does the "Share on Facebook" meta information come from [duplicate]

This question already has answers here:
How does Facebook Sharer select Images and other metadata when sharing my URL?
(12 answers)
Closed 7 years ago.
I am building a new site with a FB share button. The share button exists on the home page (http://bit.ly/1J5uJyQ) as the first button icon in the share bar.
When you click the "f" share button and connect to the Facebook share page, where does the met info in the red box in my image come from?
https://drive.google.com/open?id=0Bytqhoir_Tt5Z2t3M3lSTzlSbzg
Note this is the home page of a site.
Researched and found it --
Follow and use these links to solve the problem:
https://developers.facebook.com/tools/debug/og/object/
http://ogp.me/
Then the real key (ie., "trick") is to click the Fetch new scrape information button after loading the URL.

how to check if you liked fan page with php without app access token [duplicate]

This question already has answers here:
How to check if a user likes my Facebook Page or URL using Facebook's API
(5 answers)
Closed 9 years ago.
How to check if you liked fan page with php without app access token? I need to check if you liked fan page to know if that i will hide iframe of page like, to not display it all times while users open my site.
Is it possible? I need to check it with php with get content or curl.
<iframe id="closebox3" src="http://www.facebook.com/plugins/like.php?href=https://www.facebook.com/rohelhayatt&layout=button_count&show_faces=false&width=60&action=like&colorscheme=light&height=31" scrolling="no" frameborder="0" ></iframe>
You cant. You can either implement an idempotent "like" button which will always send a like request(and another button to unlike) or use javascript sdk to get the iframe on your site.
Use the Graph API to find what data you can access.
Replace 'me' with the post you would like to 'like' and go from there.
https://developers.facebook.com/tools/explorer?method=GET&path=me
Update
You can only like posts, pictures and such. Not pages and other stuff in the top level of th graph. You need Javascript sdk or log into facebook.
Sorry for the confusion, hope this helps!

Is it possible to have a custom facebook like button? [duplicate]

This question already has answers here:
How to trigger Facebook like button from custom button?
(8 answers)
Closed 10 years ago.
Sometimes, clients want to have a custom "facebook button". I mean with a different image and design.
I used to work with sharer.php :
<a id="fb-share" style='text-decoration:none;' type="icon_link" onClick="window.open('http://www.facebook.com/sharer.php?s=100&p[title]=foo&p[summary]=bar&p[url]=https://www.foobar.com/&p[images][0]=https://www.foobar.com/thumb.gif','sharer','toolbar=0,status=0,width=580,height=325');" href="javascript: void(0)">
<img src="img/share.gif" width="62" height="18" alt="Share"/>
S</a>
But it seems it doesn't work very well since facebook has deprecated the Share button. Instead, we have to use the "like button".
So is it possible to have a custom like button with a custom image ?
I've seen on the facebook api page a generator to create the button but i would like to know if it is possible to have a custom button with a different image ?
It's possible with a lot of work.
Basically, you have to post likes action via the Open Graph API. Then, you can add a custom design to your like button.
But then, you''ll need to keep track yourself of the likes so a returning user will be able to unlike content he liked previously.
Plus, you'll need to ask user to log into your app and ask them the publish_action permission.
All in all, if you're doing this for an application, it may worth it. For a website where you basically want user to like articles, then this is really to much.
Also, consider that you increase your drop-off rate each time you ask user a permission via a Facebook login.
If you want to see an example, I've recently made an app using the open graph like button, just hover on some photos in the mosaique to see it

Programatically add tab to fan page [duplicate]

This question already has answers here:
Add a Tab to a Company's Page - Programmatically
(2 answers)
Closed 9 years ago.
I have a site where people can log in and link their FB fan page. When they link their fan page, I save the pageId and an auth token, which I then pass to FB API to post to their wall.
What I would like to be able to do is have a button on my site which, when clicked, would add a new tab that is essentially an iframe with a url to their profile page on my site.
Looking around, I've only seen examples that reference an application Id. I get the impression that this application Id is not the id of my application, but that instead that each user needs to create an application of their own, and then I can set the page url of that application, which is way too technical for my audience.
Preferably, the entire process can take place within my site and the call would be something like:
{fbEndPoint}/newTab?authinfo={their token}&pageId={fbPageId}&url={urlToTheirProfilePageOnMySite}
To answer my own question...
What I wanted to do was have a way of knowing what custom page from my site to display when the tab was selected. I figured that when the tab was added, I needed to provide the URL to their profile page on my site. What I did not realize, was that when adding a tab to a fan page, what is really happening is that my app is being added to the tab and the URL that will be displayed in the iframe is the "Page Tab Url" from my app settings.
When someone visits the tab, Facebook provides me with the page Id of where the app is being viewed in the signed_request parameter. Using the pageId form the provided signed_request param, I can then look up which custom page to show on my site, since I know which member installed my app in the provided pageId.
Hope that helps someone!

facebook login page in lightbox [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Facebook page acquire full screen after clicking on iframe
I want to open facebook login page in a lightbox.
if i tried to open facebook page in iframe then after loading successfully , in case a user click on an iframe , facebook will cover the whole page.
But i want to open it in lightbox
Please do not re-post your question multiple times.
Facebook page acquire full screen after clicking on iframe