Adding FB share button to pages behind sign-in - facebook

I have web page which needs users to sign-in (not FB signin though), and need to add share button to it. Issue is when I share that page, it only posts link to the wall. og image and og:description tags are ignored.
btw i am using iframe to show fb:like
Can you please let me know how to solve this issue?

You need to generate open graph tags even when user is not logged in.

Related

Why does FB sharer use only the OG meta tag details on the home page?

I have a project, coded on codeigniter, which is basically a collection of posts by different users. While adding the fb share button and clicking on it, The image, title and description content is taken from the header of the home page and not of the page(view) where the share button is placed?
As mentioned here, The issue was that only those users could view the page who are signed in, and therefore even fb wasn't able to scrape the info from there.
EDIT: Whats important here is how FB scrapes the info. Apparantly the link you provide inside data-href if parsed by FB and they capture the og meta tags from the header on that page. However if you restrict those pages to logged in users, FB is also unable to parse the page and thus it reverts to the base URL's meta tags.

Facebook Sharing plugin doesn’t detect the specified post URL

I use Facebook share button to share my article (Title, description and image) on Facebook using Open Graph Meta and other default Meta
And my articles are echoed in post.php page like (mywebsite.com/post.php?id=post_id) which contents differ through post_id.
Well, while sharing a post on fb, facing some problems.
1: fb share doesn't detect the image belonging to the article/current post that is shared. (Thought the image URL in my Open Graph Meta is correct) and after sharing it on Facebook the link doesn’t redirect to the exact URL (mywebsite.com/post.php?id=post_id).
2: the fb share button is in my post.php page which shares different posts but sharing is counted same for all posts.
The FB share button has got an attribute (data-href="url-to-share") which my one is (data-href="<?php echo'post.php?id=post_id';?>").
Anyone know what and where is wrong with my code/URL addressing?
If your meta tags shows correct data then must be fb issue. I faced similar problem before.
Try debug your url in the FB debugger( https://developers.facebook.com/tools/debug/og/object/ ). It helps.
Fb haven't grab your updated data because they have their own time/interval to grab new data from the website(if im not mistaken). Using the debugger u'll see how the share will look like and show missing details if any.

Like button for Facebook page shows generic Facebook description in News Feed

I want a Like button on my web site that Likes my Facebook profile (rather than my web page), so that when a user clicks it they subscribe to my Facebook posts.
I've created the Like button using the tool at https://developers.facebook.com/docs/reference/plugins/like/
Further down that page there is an FAQ entry:
Can I link the Like button to my Facebook page?
Yes. Simply specify the URL of your Facebook page in the href
parameter of the button.
So, I've edited the href parameter to point to my Facebook page. eg:
https://www.facebook.com/myfacebookid
When a user clicks the Like button it has the desired effect. The user ends up having Liked my Facebook page. This is easily verified by the user going to my Facebook profile and checking that the Like button has changed to Liked.
But. When the user clicks the Like button, and entry appears in their News Feed with a generic Facebook description. ie:
Facebook is a social utility that connects people with friends and
others who work, study and live around them. People use Facebook to
keep up with friends, upload an unlimited number of photos, post links
and videos, and learn more about the people they meet.
I don't want a generic post about Facebook to appear. I want the description to relate to my Facebook account and/or web site.
Normally, I could modify this behavior with the Opengraph og: description tag, but as the page in the href is a Facebook page and not my own, I can't control the Opengraph tags.
I'm pretty sure that this was working okay before I enabled timeline for my account, so maybe this is a timeline bug?
So, how do I add a Like button which a) Likes my Facebook profile rather than one of my own web pages, and b) Posts a description of my Facebook profile rather than give a generic Facbook description?
Are all your fields in the info part of your page filled in, and/or completed? I just tested your theory and it seemed to work as expected, only thing is I know all fields in "info" are filled it. Give that a try.
This may happen if you have filled invalid/incomplete/wrong og tags in past and later changed them. Facebook's cache creates problem sometime.
Try putting all the entries (i.e. all og tags) and then debug them here http://developers.facebook.com/tools/debug. This debugger gives a detailed info about the url with og tags and also clears the cache for you.
This should solve the problem.
You have 3 important fields that used on page opengraph: Name,Description,Profile Image.
They are used when some one post your link on Facebook, or Google or some else web service that handle opengraph.
Actually, the suggested answers currently do not work and there is an open bug / ticket on Facebook for it. Up to now, there's no fix.
The problem is that you can not use simply https://www.facebook.com/myfacebookid. You should copy and paste the exact page URL. If you have a low number of likes it would look something like https://www.facebook.com/pages/[YourPageName]/[Your page Id]/, and this is the URL that you should use at this point.
If it does not work, try also https://www.facebook.com/[YourPageName]/[Your page Id]/.
In short, copy-paste the URL, do not type it manually.

Using Open Graph Protocol to Link Site with Facebook Page

I have a website at http://www.mydomain.com which has a corresponding facebook page at https://www.facebook.com/pages/mydomain/123456789.
I am looking for a way to integrate this facebook page URL into the open graph headers so that when someone shares my page, it actually shares the Facebook page instead of the site's URL.
Is this possible?
You can now do this by setting the og:url meta tag to the url of your Facebook page. Keep in mind that if you do this, other networks that use Open Graph tags will probably share your Facebook page instead of the site's url, so make sure that's what you want.
<meta property="og:url" content="http://www.facebook.com/your-page"/>
Perhaps you already figured this out as this is an old question, but since I stumbled upon it... If I understand your question correctly, you do not even need the ogp meta tags to accomplish what you want to do. All you need to do is go to http://developers.facebook.com/docs/reference/plugins/like/ and input your facebook page url in "url to like", https://www.facebook.com/pages/mydomain/123456789 from your example. Then select the options you want including the "send" button. Then get the code and paste it where you want it in your website. Now whenever someone clicks "like" on your website or clicks "send" to share your website, they will actually be liking or sending the url to your Facebook page and not your website. Is that what you were looking for?

Facebook Like Button Keeps Resetting

I'm trying to add a facebook "like" button to my page, and it is appearing just fine. My problem is that once it is clicked by a user, it says "Like NUMBER" then resets as if the request was canceled or something.
The weird thing is that if I try to like a page using my facebook account it works, but I tried letting a friend like some content and this behavior appeared.
I created a facebook app, specified the site url with a trailing slash, and site domain. I used the app ID with FB.init, and with the open graph tags. I can't figure what I'm doing wrong here. Any help would be appreciated.
Sample page can be found at: http://wiseolive.com/en/doctors/3881-khalid-jamal-salaymeh
First, for the count to work correctly, Facebook needs to have access to the page (in other words a public page). Check your URL in the linter tool (https://developers.facebook.com/tools/debug) to ensure it can been seen by Facebook.
Secondly, ensure your og: tags are correctly setup. Once again, you can use the linter tool to do that.
Facebook like buttons will show this behavior until they have been scraped by Facebook. That scraping (facebook like docs) will occur every 24 hours, when an admin clicks the like button or the url is put in the url debugger/linter. From what I can tell doing that will solve the problem for that specific link, but not any others you may have on your site.
I don't know of a generic solution for dynamically generated pages unfortunately.