How does the fb_ref parameter on a Like button actually work? - facebook

Trying to track sources of Likes to a Facebook Page. Docs from Facebook say:
ref - a label for tracking referrals; must be less than 50 characters and can contain
alphanumeric characters and some punctuation (currently +/=-.:_). The ref attribute causes
two parameters to be added to the referrer URL when a user clicks a link from a stream story
about a Like action:
fb_ref - the ref parameter
fb_source - the stream type ('home', 'profile', 'search', 'other') in which the click
occurred and the story type ('oneline' or 'multiline'), concatenated with an underscore.
But if you are sending Likes to a Facebook Page - NOT an external website - where can you get this fb_ref data? Appears that it's not available in Insights, and you can't put Google Analytics on a Wall, obviously.
Any insights here?

My understanding is that you would use it as follows:
Jim is logged into your site.
Put a FB like button on a page on your web site. You're generating the page dynamically so you can generate the FB like button dynamically too. Since "Jim" is logged in, you can include "Jim" as the ref in the FB Like button.
Jim, an FB user, LIKES the page, and presses the Like button (that includes the Jim ref).
A link to your web page appears on Jim's FB page and all of his friends see it.
Susan, a FB friend of Jim, sees the "Like" about your website on Jim's wall (it appears in her newsfeed.) Excited about the link, she presses it.
Your website receives an incoming GET request from Susan's browser. It includes the ref=Jim. It also includes the fb_source="profile" This tells your page about the requestor.
Your website now displays the page to Susan. The page (dynamically) includes the greeting "Thanks for being a friend of Jim!" etc. Note, you don't know the requestor is Susan, you only know that the requestor found out about the page via Jim's Like of the page. In order to find out that the person is Susan, you need to get her to signin/signup for your website.
Docs for the extra Get params: see the description of the ref param here
Added
Re: But if you are sending Likes to a Facebook Page - NOT an external website - where can you get this fb_ref data? Appears that it's not available in Insights, and you can't put Google Analytics on a Wall, obviously.
Do you mean that you're creating a Like button for a page on Facebook that is not a FB app? AFAIK you're right, you can't see the ref data. The ref data is made available to the target of the Like.
You could create a simple website page that re-directs to the FB page. You'd then collect ref info before re-directing to the FB page. Your simple re-direct page would be the target of the Like. But you'd have to fake out FB's graph tags--they'd know that the canonical url for the page was fb.com/xyz. May not be possible to direct to your_site.com/fb/xyz.

Related

logging referrer ID with Facebook page like

Is there any way to log the referrer Id for a Facebook page like action.
Use Case:
I have a site with FB like plugin integrated in few modules, which are referencing to a FB page.
I want to log a particular Id (specific to particular module) when user Likes the page, so that I can analyze later which module generated how many likes.
I can find 'ref' option in FB API: https://developers.facebook.com/docs/plugins/like-button#faqref
But not sure whether it will fit in my scenarios and how.
When you use the ref parameter on a like button, clicks back to your website which were generated by that Like button, contain two extra parameters in the referrer: fb_ref, containing the same value you gave to ref, and fb_source which shows where on Facebook the story was clicked.
BTW, this answer has been previously answered here: Tracking like button referrals from Facebook using the 'fb_ref' parameter in our code
Here's some relevant documentation from the Like Button and the Ref Param:
https://developers.facebook.com/docs/plugins/like-button
https://developers.facebook.com/docs/plugins/faqs/#ref

How do I add 'Like Page' button to my URL timeline post

I have used opengraph to share my website to facebook. Is there any way I can add a 'Like Page' button to it, so that my associated FB business page gets liked instead of the shared post?
https://developers.facebook.com/docs/sharing/best-practices#tags
“article:publisher - This property links to the publisher of the article. The target of this property must be a Facebook Page. When displayed in the News Feed, Facebook may offer the ability to like the publisher. Note that this tag is only available to media publishers.”
So your og:type of the shared object must be article, and your page that you specify as publisher must be in the appropriate category.
Notice also how it says there that Facebook “may offer” the page like button, meaning there is no guarantee it will show up if Facebook doesn’t think your page is important enough.
That looks like a sponsored post. The add searches what friend liked that page and suggests you to like that page, because your friends liked it.

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.

How to migrate an Open Graph Page to a Business Page?

I have implemented the like button on a website. People have liked the website, and I have the option to administer that open graph object. However, on the administration page I see the following notice:
Administer Your Page
This is the administration interface for your
webpage at [...]. You can see Insights and
publish to the users that have liked your webpage. Only the
administrators of the webpage can view this interface, other users are
sent to the webpage.
This is a ghost page, because, as the notice says, only the administrator(s) can see it. I don't want the behavior of users being sent to my website. I want them to be able to stay on Facebook and see this page, just like they would see and interact with another business page.
Is there a tool or a request form to do this kind of migration (i.e. from an open graph page to a normal business page)?
I have researched for about two days for this issue, but I have not found any leads.
According to this help article, you can merge two facebook pages into one. But the constraint is that you can merge to a page with higher likes only, and the page with fewer likes will be removed. I am not sure if it works for ghost pages or not.
Shef, let me try to answer:
if you have an app myapp, that is canvas url https://apps.facebook.com/myapp
then you will have an application profile page: http://www.facebook.com/myapp [*]
So if a search your app from google or facebook, then they come to first this page,
and if they click go to app, they reach to your app.
However if you have just implemented like url: myapp.com/myitem=1
then you will have this "ghost" page. You need this ghost page, because you need somewhere
to administrate your likes
So you are asking a real page instead ghost, well this is hard to implement this request by facebook guys. Because there is like link to refer some url. So there must be some pop up asking user: 'Do you want to follow link or go to business page instead'
[*] username is not available anymore for facebook apps. see How to get name of facebook application page?
You can use the ref parameter while specifying your like button. This ref parameter will be set by Facebook, for all url's/links that appear on Facebook, i.e wherever this like action is displayed with the link to the url liked by the user. So you know when a user visits your page through Facebook. Check the following from this link:
ref - a label for tracking referrals; must be less than 50 characters and can contain alphanumeric characters and some punctuation (currently +/=-.:_). The ref attribute causes two parameters to be added to the referrer URL when a user clicks a link from a stream story about a Like action:
fb_ref - the ref parameter
fb_source - the stream type ('home', 'profile', 'search', 'other') in which the click occurred and the story type ('oneline' or 'multiline'), concatenated with an underscore.
Upon calling your url you can redirect the user to the page on Facebook that you want. Business pages on Facebook have a particular url, of course, and you can easily do the redirect.
I don't think that you have an option to migrate an open graph page to a normal business page. You can however create your page, and give it the same name as your website. The draw back here would be when users like your page on Facebook, you won't be able to accumulate the likes already garnered by your website.
EDIT
Take a look at the like box plugin (Facebook doc here ). It can be used to like pages that are on Facebook itself, from external websites. This way you will be able to accumulate your likes. You can also modify the plugin to look like a like button, not fully but almost. But you still end up creating a new page. And the old likes will not be available.

How to build FaceBook "Like Button" that likes a Page message?

For example:
I have a FaceBook Page about my website.
On my website, I display my 3 most recent FaceBook page messages (graph.facebook.com/[pageId]/[more parameters])
Next to each FaceBook Page message (as they appear on my website) I would like to add a FaceBook Like button. When the like button is clicked, a "Like" should be given to the FaceBook Page Message. How can this be done?
Simply use the permalink of the post as your url in an fb:like button. The tricky part will be figuring out what the permalink is, since it takes different forms if it's a link, status, or video. For a link or status update, it's this format:
http://www.facebook.com/<PAGE_USERNAME>/posts/<POST_ID>
Or, if you don't have a username:
http://www.facebook.com/permalink.php?story_fbid=<POST_ID>&id=<PAGE_ID>
You can determine the post ID and page ID by accessing http://graph.facebook.com/<PAGE_ID>/posts and splitting the id string on the _.
You should be able to POST to the /likes URL of any object that supports likes. No arguments should be specified. You can remove a like by executing a DELETE request to the same URL.
/OBJECT_ID/likes
Like the given object
(if it has a /likes connection)
So the URL you should POST to, is https://graph.facebook.com/[pageId]/likes
Read more under Publishing on this page: http://developers.facebook.com/docs/reference/api/