Getting the facebook-user-id of the like-button presser (facebook) - facebook

I'm using the Facebook Javascript SDK and fbml like-buttons. Using the 'edge.create' callback I know when someone has liked an url. Is it possible to get the facebook-user-id as well? Without them having to log into my App/Domain with FB Connect
I would like to double-store likes for internal statistics (since it's hard to get very fine grain domain statistics via facebook.com/insights)
Regards,
Niklas

That information is not available to developers through any of the facebook API's. You might want to store the uid's locally when the user clicks a like button.
Hope that helps.
-Roozbeh

Nope, it is not possible to get a users id simply from them clicking on a like button.
I'm not sure why you would even need a users id to simply help you track like button clicks, if you need some sort of unique identifier try using sessions or a cookie.

Related

Detect 'Like' in Facebook Social Plugin

I have a webpage with a Facebook Like button (social plugin).
I need to show extra information on my page when the user has liked the page.
I know there has been similar questions but the answer has been to use the edge.create event to react to the user clicking the like button. This works fine except when the like happened prior to loading the page.
Others have suggested using a signed_request but I believe this is only applicable to canvas applications,
I know I can use the API to check for the like but this requires the user to grant permissions, but I want to do this in an anonymous manner (I am not interested in knowing who the user is, I just want to know if they liked the page).
Is there any way to do it?
Well this is exactly the difference between having a canvas app and a site that just uses the plugins. The plugin allows (you to allow) the user to like a certain URL and that's about all. In order for the site operating outside of Facebook at explicitly access that data, it'll need the correct permissions as you have noted... the user_likes permission.
Without a signed_request or the relevant permissions from the user, I do not believe that you'll be able to differentiate between users that have "liked" your URL.
Use a javascript onclick to detect when the like button is clicked and localStorage to store the info?

Providing users with a way to detag their Facebook photos

I run a social membership club and my website users can log into my site with each having their own profile page.
On each of my user's profile pages, I want to display a list of photos which have been tagged with that user on Facebook. I know this part is possible.
The bit I am struggling with is giving each of my users the ability to 'untag' themselves in each photo of them that is displayed in the list. The 'untagging' should happen directly from my site. Is this possible and how could I go about doing this?
Hope someone can help/has ideas?
Unfortunately, there's no facbeook API that allows removal of photo tags at this time of writing.
Its not documented and I haven't tested this but I'd chance issuing a DELTE request to
/PHOTO_ID/tags/USER_ID
Worth a shot through the graph explorer anyway.

Can I check if user is a fan from a page outside of facebook?

I've 'fan-gated' from within an iframe on a facebook tab before but I'm trying desperately to 'fan-gate' from an external website that is not within the facebook framework. We want users to "like" our client's facebook page in order to print a coupon for their product. All the different methods are making me dizzy and I feel as if I've tried each of them three times already!
You don't have to tell me HOW to do it but does anybody know if:
It is even POSSIBLE to do this outside of a facebook iframe?
What is the method I need to go with to make it happen? (Graph API, FQL, etc.)
Thanks so much in advance for any help you all can offer me.
It's not possible. Not sure what methods you've tried so far but your best bet to have functionality even remotely similar to what you're asking is to:
Direct (i.e., deep link) users to fan-gated tab on the client's FB page
Upon the user liking the page, generate a unique link that redirects the user to the page on the external website that holds the coupon.
Expire the link after it's been clicked so that no one else can use it. Alternatively, you can attempt to tie the unique link to a cookie on the user's machine (or something similar).
Modify the external website so that no one can directly link to the coupon without being routed through this fan-gating process.
Not the best user flow in the world, but it's the only way that I can think of to make it work. Trust me, I've tried. =)

Check whether user of non-facebook app likes/shares particular URL on FB

I'd like to know if there is a possibility to check (using Graph API or any other way) whether given user likes / shares a specific link. Probably I'll have this user's facebook ID or facebook login, but my site is non-Facebook application. Actually it's Dot Net Nuke portal (target: .NET with MS SQL Server) with part of it being avaliable as Facebook app, but certainly not greater part of it, so the solution should be out of Facebook Connect, although it's not a showstopper if it's necessary.
We'll be giving points to users who share/like most of links that we serve in our portal and such possibility would be a great help to make a ranking.
Another option we consider is making some kind of "wrapper" or proxy for FB like / share buttons which will at first save some data in our database (probably - this user clicked on like for this link) and then go on with standard FB like / share route. Did anybody of You tried such solution?
If You have any other suggestion on the subject, please, post them, we'll be really thankful.
It is possible to know if a user has LIKED a site or not. You can get all user's likes with Graph API (you need user_likes permission). Take a look at the docs: http://developers.facebook.com/docs/reference/api/user/
I'm not sure if you can know if he has shared your site, but you could try by parsing his wall with the read_stream permission and then look for your site name/URL post by post.
For just general liking of items on your site, you can use a Facebook Social Plugin. However, you won't be able to associate (or really even access) user activity with users on your site without integrating Facebook Connect and creating a Facebook application for your site. At that point you can design with greater control all the possible user activity and interleave with your facebook calls other calls that affect users' accounts on your site.

Get application liker via graph api

How can i get all the facebook user id whose like my application via a graph api.
Please give any suggestion.
Like facebook fan page showing application liker randomly. I also want to access my application liker list and want to save in database.
Please tell me if any possibility? Need your suggestion...
Thanks
Sorry, I don't think that's possible for privacy reasons Facebook doesn't allow it. You need to get people who like you application to install and authenticate it before you can find out more about them. However, I do remember someone managing to scrape the fans of a page before so maybe that's possible for applications as well...