Do you know if there is any way to publish on my web app the facebook messages published by the users on my facebook wall application?
I'm using spring social and I tried to use the code you can see below:
facebook.feedOperations().getPosts()
With this sentence, it is launched an exception alerting that Authentication is needed.
Thanks.
Regard
Nope. If you could, then Facebook would need to seriously evaluate their security. The user needs to give you permission to access their data. After authenticating can use the returned user token to access the user's Facebook wall posts.
Related
I'm kinda getting lost on Facebook documentation. I'm creating a Messenger Bot. This bot is also integrated with Facebook Graph API and needs to read the users wall so he needs the user_posts permission.
My question is: how do I get this permission?
As far as I've understood, there's no real way to get it from the Messenger Platform API. So, I've started looking into the Login API. Here I found out that I can get a user access token using an embedded Javascript in a web page to show the Facebook login dialog and letting the user to access their profile.
However this sounds so cumbersome... Is there an easier way to do this?
Thank you for the help.
I develop a Facebook application where i implemented the login with Facebook accounts using "https://graph.facebook.com/me?fields=id,first_name,last_name,email,picture&access_token=xxxxxx" end point from the Facebook API. With the data receive to the Facebook I created an user in my database where I can login with this.
Now, I must will get all the users Facebook which use the my Facebook application. There are a Facebook end point where i can receive from the API all the users Facebook in the JSON format ?
Thank you !!
Now, I must will get all the users Facebook which use the my Facebook application. There are a Facebook end point where i can receive from the API all the users Facebook in the JSON format ?
No, there is not. You only get user ids when they log in – to store them appropriately for whatever purpose you need them for, is your responsibility.
I am doing a static web page in my website, in which I am showing the like count of particular Facebook page. There is no kind of login required to see this web page. Also, I don't want to user to login with their Facebook account to see the Facebook page like count.
I have implemented this requirement by using Facebook app token.
API: "https://graph.facebook.com/PAGE_ID?access_token=APP_TOKEN"
But the problem here is, If I use the app token of already approved app by Facebook with some permissions (manage_pages) exists, it works. It is not working for the app token of newly created Facebook app.
I have sent the app for review to Facebook by requesting manage_pages permission, but they rejected the app and said that my website doesn't have the Facebook login functionality implemented.
Since it is not documented clearly, I have a doubt that do the app need to send for review if I want to get the Facebook page like count without Facebook login (By using Facebook app token)? If yes, what permission do I want to request?
Any help would be much appreciated.
First of all, you need to learn what Tokens there are:
https://developers.facebook.com/docs/facebook-login/access-tokens
http://www.devils-heaven.com/facebook-access-tokens/
For your problem, you can just use an App Access Token. There is no need for any permission or Login Review, the links above tell you exactly how to create one. Make sure you never use the Token on the client, especially because it includes the App Secret. Do the API call on the server only (file_get_contents or curl, if you use PHP).
If by "it does not work" you mean that you only get the id and the name, then it´s not about "not working", you need to read the changelog and search for "Declarative Fields": https://developers.facebook.com/docs/apps/changelog#v2_4
So if you want to get more than just id and name, the API call would be like this: https://graph.facebook.com/936299239766048?access_token=YOURAPPTOKEN&fields=id,name,likes,...
I'd like to show my facebook wall posts on my website.
So i don't want to authenticate users with a dialog, to grant them some rights, i just want to show him my wall with comments (no ability to add comment just read only access).
As i know there isn't unexpired tokens now so is it possible to access just my data without requesting token every time it expires?
I'm using asp.net mvc but i think this sultion doesn't depend at platform at all.
You should:
Make your Facebook Posts public
Call the API endpoint: https://graph.facebook.com/{your_id}/feed?access_token={app_access_token} with your user_id and valid application access_token
Show the results on your website.
The App Access Token doesn't expire so you won't have a problem. As long as the posts are public, the API will be able to pick them up. In theory, your posts should be public anyway so anonymous users can see this.
This also gives you the ability to share stuff privately and not have it show up on your website.
Suppose that I make an app that is using Facebook login (basically for dealing with who is who). Is it possible that the app to fetch the user's history from Foursquare if it get the user's permission? (The user uses Facebook's login on Foursquare as well)
No. You need to go through each authorization flow separately. First, the user grant your application access by going to Facebook and coming back with an access token (or authorization code you later exchange). Then you need to send them over to Foursquare to approve access again. Foursquare might need to authenticate them via Facebook but that's really not your concern (and should be transparent if they have an active Facebook session). Foursquare will issue you another access token for their API.
There are discussions in the community about the use case of allowing your application to pass the Facebook access token to Foursquare so they can validate the user identity with Facebook and then issue you an access token. However, there are many issues with that. By not directly interacting with the user, Foursquare has no way of knowing that the user wants to give one application access to their data stored on another application.