Fetch username on clicking link that is posted via feed dialog? - facebook

I wanted to fetch username / id of the facebook user who has clicked on the link which is posted via feed dialog on his wall/ friend's wall.
Is there any way to accomplish this?
Currently we pass a static link to the post feed dialog api. Is there any mechanism to make this link fb-user-specific?

No, without authorizing the user, there is no way you can get any personal data (that includes the id). That´s for privacy/security reasons.
It is also not possible to use a dynamic link which is dynamic for every user that clicks on it.

Related

Share existing post to Facebook app by id/url using Graph API

So in my app I display some Facebook posts from a predefined page. I get the posts from my server (the server gets them from Facebook directly) and this way I avoid using the Facebook SDK.
For each post, I have both the id and the URL and whenever a user presses on a post I open the Facebook app on that given post.
Now I'd like to add the possibility for users to share these posts to their profile pages, but when a user opens a post (on the Facebook app) it doesn't appear any option to share it (only like and comment). Other option would be to use the standard android sharing feature (ACTION_SEND), but whenever I share a post's URL this way the app only shares a picture from that post, not the actual post.
Any help would be much appreciated,
Regards
There is currently no way to mimic the "share" behavior that exists on the facebook.com website using graph API. The closest thing would be to use the link field that you mentioned.

Facebook JS Share Dialog and Timeline select

I have created a button on a test website which gets the user to post a custom Open Graph story using the Facebook Javascript SDK. (*** is going to an event).
However, my users do not get the option to post this action to their Groups Timeline, or share on a friends timeline – see the below Facebook sharer dialog, (where you are always sharing a link – I don't think you can use Custom Open Graph actions with the Sharer).
I've looked all over the Docs and can't seem to find a way to make this functionality happen – trying to avoid users having to login to my site with Facebook/ generate a user access token.
Any solution?

Can facebook API do this?

On my site I want members to be able to click a link import your Facebook photo then a Facebook popup opens and asks user to confirm that he/she wants to share their profile picture with my website.
Can this be done? What are the steps? I am looking at the Facebook graph API but I am unsure if this is the right thing, I have huge problems understanding their samples and "help" files.
I was able to easily do this with Gmail and Yahoo, uses can get a browser popup from them in order to confirm sharing contacts with my website, I assumed Facebook works the same to import the profile picture but I am spinning in circles.
Within Facebook Terms for users it states that your name and picture are publicly available so one does not need permission to request it.
https://www.facebook.com/about/privacy/your-info
The naitik call is an example of data that is publicly available without asking for permission.
When you are requesting the current user, that is, you don't know the id or name beforehand, then you use a basic login flow which will then present one of the following dialogs.

Facebook get user id

I am making a simple contest on Facebook which is a form to fill in.
I would like to add a mechanism with share options.
You will win another chance for each friend who will click on the back link.
Technically i wish to add to the shared url the user id to add 1 chance for him in my database (sharing options will appear after the form)
So i need the user id but i don't want to display the FB popup "accept this application" before launching my app. Is it possible?
If not, do you have an id or online to do it with open graph and all that stuff?
There is no way to get the User-/Facebook-ID of the user without login/authorization. The signed request variable only presents basic infos if the user is not logged in (like status, admin status, locale, ...).
So, in order to get the User ID you have to authorize the user, i recommend the JavaScript SDK for this:
https://developers.facebook.com/docs/howtos/login/getting-started/
This is against the Facebook Page Terms.
You can not have a contest where sharing is considered a entry in a contest.
Follow this link and look at Section III.E.3 for details
https://www.facebook.com/page_guidelines.php

Facebook get users that like our business page

Our business wants to give a free gift to all the users that like our facebook page. Do you know a way to get the list of emails with all users that liked our page?
Is it possible to obtain that using graph API?
Is there any possibility to offer this functionality to our customers? My problem will reduce to check if one user likes our page.
Radu,
This is not possible at (with FB API) at this time.
See here
You could create tab (with a canvas url) on your facebook page that does the following:
User clicks the tab (or is directed there by some other link)
On the canvas page, use the FB api to check if that user has liked your page. If not, persuade them to do so.
If the user liked the page, show a form where the user can enter his email.
Store the data on your own server.
Hope this helps.
After much research, I used this solution:
I call FB.login to authorize my application and request 'user_likes' permission
check /me/likes/[pageid]
If the response is not null the user likes our page.