Adding links to facebook newsfeed - facebook

Is there anyway I can attach a link to a news feed (which was not created by my application)?
Lets say that I would like to create a "send a hug" application. So now when a user browse his news feeds he can see a link at the bottom of each news feed saying "send a hug to this person".
One way to create such an application is to display inside the IFrame of the application all of the user's news feeds through the API (and then I can add whatever I want). However, I would not like the user to enter the application tab each time he wants to send a hug, but to show it to him directly on his facebook's news feed page.
Thanks,
Meir

read this
Name Description Permissions Returns
link The link attached to this post Requires access_token string containing the URL
name The name of the link Requires access_token string

Related

Comments social plugin for Action post

I have an app app1 which defines a custom Facebook action act1.
When a user performs this action to an entity (ntt1) in my app, I post to API /me/app1:act1 with URL to ntt1 as its param, so that a post is generated on user's wall saying User act1'ed ntt1 where ntt1 is a link to ntt1's view page (with open graph meta data on its header).
Users can comment or like on this wall post regularly.
Now I want to show users' comments on ntt1's web page as well to share the comments and likes between the Facebook wall and ntt1's view page.
I tried using the Comments social plug-in, but don't know what to put in the data-href to point to the action_instance_id of the wall post.
I know I can simulate a comments box on my page using the graph API (and I've already done so), but this is not making a good ux, because the users need to authorize to my application to view this page (so that the java script API can fetch the comments from the Facebook).
Have you tried just pointing the data-href attribute to
https://www.facebook.com/{user_name_or_id}/activity/{action-instance-id}
…? The docs for using actions say this is the URL you can use to “preview” the news feed story that this published action will generate (or rather has already generated, because without publishing the action first, you would not have an action-instance-id).
If you click on the “x minutes/hours/… ago” link for the feed story for one of your published actions, it should take you to a link that’s build using the same scheme.

Facebook creates a Business Page for each page on my site

I'm experiencing some issues with my website, regarding to Facebook page's behaviour. I added the opengraphs tags (including an "fb:admins" with my own ID) and now, everytime I click on a Like button on my domain, a new Page is created inside Facebook (i.e. on the http://facebook.com/pages/manage).
Why is this happening? And even more important: how can I make it stop?! I manually created the Page on Facebook for my business, and I don't want any other Page on FB to be created!
Thanks in advance!
That's how the Like button works ; it creates a virtual 'admin' page for each liked URL which is of the appropriate type which allows you to post updates into the news feed of the users who have liked that URL - it also enables access to the insights for the Like button
If you don't want them appearing in the list of adminned pages on your account for some reason, the easiest thing to do is to create an App, and use the App ID as the admin of the pages instead of using your user ID.

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 does the fb_ref parameter on a Like button actually work?

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.

How to find out which user clicked an image on my facebook website/application?

Say I have a facebook page/app that contains images of products that I sell. Is there a way that I can find out who the user details(facebook account) is when an image is clicked?
Assumption I am making:
You are using a custom page tab
The page tab is an iframe
You have GDPed the user when they clicked on the body of the tab
You now know the user in the app on the tab
All actions by the user contain the user ID (so you can customize the experience)
Then you're already done!
C # facebook
you can take it by IP from access log, or you have to aim all images to php file (to log user data) before showing image
From my knowledge, the user has to connect with your app first, before you can get his user id. After you have this piece of information, it's rather simple to log all his requests.
Assuming that clicking on a product image doesn't necessarily send the user to a new URL, but maybe shows a zoomed image or shows more information, you could use Javascript to send an Ajax request to your server containing information about the product and FB user id. The URL can look something like this:
http://example.com/log.php?uid=xxx&product_id=ppp
Then server-side you'll store the information in the database.