Get FB User when authenticating to Facebook via Send Button - facebook

I've done quite a search on SO and this doesn't seem possible. But I'll ask the question, just in-case someone does know if this is possible.
With the standard like/send buttons. If an unauthenticated FB user clicks send and via the FB dialog window then authenticates. Is there a way of finding out the FB id of this user?
Edit: To clarify, this question is not about clicking the like button. I know you can't get any information from clicking it. This is about clicking the send button and then post auth with FB.

This is not possible, as already seen in
How to know who clicked the Facebook "Like" button on my site?
How can I get user's facebook ID who clicked like button?
You can only track users that allowed an app made by you to access their information.

Related

Notify user who liked my website

I have a website that have a like button with url pointing to the website's url. The like button works, but I can't seems to figure out how to send notification to users who like the button. I understand that the admin button for a like button is no longer possible and the migration window is already closed. I should change the URL to a facebook page. But if I change it to a facebook page, then when the user share the link, they will open the facebook page, not my website. So how do I make it possible for the user to share my website, but still be able to notify them of any news.

Share on Facebook asynchronously

I know it is possible to share a content on Facebook using a URL format like this:
https://www.facebook.com/dialog/feed?%20app_id=145634995501895%20&display=popup&caption=An%20example%20caption%20&link=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fdialogs%2F%20&redirect_uri=https://developers.facebook.com/tools/explorer
But this opens a dialog and prompts user to share, so user need to click on "Share" button. Assuming user is already logged in with facebook (let's say on another tab of the browser) I need to enable the users to share content asynchronously without clicking that "Share" button on the facebook share dialog.
I can't figure out a way.
Users do not need to click the "Share" button on that dialog. In this way, as soon as a users clicks on a "Share This" button placed ON MY SITE, the content will be posted on users's fb wall.
Is that possible?
It is possible, but only with Facebook Authorization:
https://developers.facebook.com/docs/facebook-login/
The user has to authorize your app with the "publish_actions" permission, and you can post stuff on his wall with the PHP SDK:
https://github.com/facebook/facebook-php-sdk
Just keep in mind that the message always has to be 100% user generated. So, in order to share something like this, you would need to share without the "message" parameter, or you would have to include an input field where the user could set his own message.
Btw, for the functionality you described, there is a much better solution:
https://developers.facebook.com/docs/plugins/like-button/

How can I get the facebook id of a user on my page with the like button?

My original intention is to know whether web developer can use the like button to track me. But I guess, it is not an appropriate question here, hence have reversed the view point.
Suppose I include the facebook like button, google +1 button and the tweet this button. Can I track the user ids of each of these services in case the user has already logged into those services? (But he does not press any of those buttons)
Theoretically you shouldn't be allowed to know a user's id if the user doesn't allow you to, somehow (by clicking "Like" or "Logging with FB" button for example); it would be a security breach. So what you ask for should not be possible, anyway, there are some techniques to know if the user is logged in or not, but you won't know his id.
For this thechniques you can see:
https://grepular.com/Abusing_HTTP_Status_Codes_to_Expose_Private_Information
Regards

Facebook web app... can I change something on my own website in response to a user "liking" my app?

I want a sorta basic answer on this one, just a little guidance but nothing fancy... I just want to know what direction to go in to make it so I update a specific users account (on my personal database) in response to the user clicking the facebook "like" button on my site.
So.. if someone was registered on my site, but not yet clicked FACEBOOK LIKE through my site, when they clicked it can I edit my database, specifically the entry of the user who clicked like?
Hope that makes sense?
Thanks
About as close as you can get is if you call the method for /USER_ID/likes/PAGE_ID the facebook API will return either an empty array, or some data on the page. An empty array means they have not liked it.
That will tell you if they like your facebook page, not necessarily your URL.
Here is a SO answer with some javascript/css black magic for if you really need to know if a user likes a particular URL or not.
Facebook how to check if user has liked page and show content?

Response from edge.create if Like clicker has no FB page

I'm subscribing to a Like button on my page to notify me when someone clicks the Like button. I then give this user a discount for telling their friends about the site. But what if the user doesn't have a Facebook page? Will I still get a call at my handler function. The Response passed by the edge.create call to the handler is just the URL that was liked, so there doesn't seem to be any flag passed that tells me that the user didn't really post anything to a FB page. How can I handle this and not be giving discounts for nothing?
Thanks
What do you mean by "user has no FB page"? Not every Facebook user will also have a Facebook page. I only have pages on my Facebook user account are there solely for testing purposes. If I wasn't developing apps with the Facebook API, then I wouldn't have any at all. So requiring your users to have a Facebook page may not be in your best interest. Just let them like your website using their normal Facebook user account.