I get my access_tokens by using:
https://graph.facebook.com/oauth/access_token?client_id=[my_client_id]&client_secret=[my_client_secret]&grant_type=client_credentials
Using the access_token I get, I ask for public feeds using:
https://graph.facebook.com/[obj_ID]/feed/?access_token=[token
from above]
For some reason the return value is empty []. The user's privacy settings are public for everything posted.
In other cases (for different users) I get an incomplete feed, i.e not all posts in the feed are returned.
Step by Step to reproduce the problem:
Objective: to get the feed of https://www.facebook.com/profile.php?id=100000625617939
Create an application and using your app id & app secret get the access token as described on App Login section (Call https://graph.facebook.com/oauth/access_token?client_id=[my_client_id]&client_secret=[my_client_secret]&grant_type=client_credentials)
Call https://graph.facebook.com/100000625617939/feed/?access_token=[access token from above]
Result: Empty Json
Is this a Facebook bug? Or am I doing something wrong?
Related
I'm trying to create a test page on Facebook while developing an app. Per the instructions, I've created a test user, noted the user id and created an access token.
I'm now trying to make a POST request via curl to create a page
curl -i -X POST https://graph.facebook.com/v3.3/{user-id}/accounts?category_enum=MARKETING_AGENCY&name=Test%20Page&access_token={access-token}
However the response is an error
(#100) The parameter name is required
Seems I have supplied the name parameter though; any ideas?
EDIT
If I remove the category_enum param, the error becomes
(#283) Requires manage_pages permission to manage the object
However, I have verified the user has the manage_pages permission....
Beware of the facebook api documentation... On the surface it looks like only the name parameter is required, however after hours of experimentation with the Graph API Explorer I managed to create the test page with no less than 9 required parameters!
I have a page that acts as the admin of various events. I am attempting to retrieve a list of people who have RSVPed as attending.
I used to be able to access this list with the following, where the access token was generated by an app I created:
FB.api(
'/{event-id}/attending',
'GET',
{'access_token':{access-token}},
function(response) {
// Insert your code here
}
);
This now results in a permission error.
I've used the explorer to try generating different types of access tokens, but all I can get from that edge now is an empty data object.
I've read that permissions errors will fail silently in this manner, but I can't figure out what permissions I need to retrieve this data. Even when I use an access token from the page (which is listed as an event admin), I come up with nothing.
It is no longer possible to get the attendees:
https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#events-4-4
GET /events — You can no longer get the following edges:
attending
comments
declined
feed
interested
live_videos
maybe
noreply
photos
pictures
posts
videos
I have read almost all the graph API and i don't get this thing at all .
I am some user, who needs to get some other public page photos . thats it,very simple.
So to do that, i can just :
https://graph.facebook.com/page id/photos/uploaded/
Which is works great. gives a json with the photos .
BUT ,Facebook is always talks about this tokens everywhere. you need a token to everything .
So after so much frustration i have got this token i created to some app i made.
Problem is, what i do with this token ?? i don't see any place in the API where i put this token in the http request .
Take this request i showed here for example, it works for any page without a token. so where goes the token? why do i need it ?
Why when talking about getting images of some page they always say you must be the admin of that page? NO I DONT want to be the admin of a page, i just want to get photos of other page, that i don't own, with a simple http request.
Everything is messed up for me .
You can apply an access_token to any Graph API request by appending ?access_token=xxx to the URL. In your example, the resulting URL would be:
https://graph.facebook.com/page id/photos?access_token=xxx
The access_token is typically used to access any data that isn't public. While its true that you don't need an access_token or be an Admin of a page to get Photos, you may still need an access_token to access pages with location or age restrictions.
For example, I can easily get public photos from the Coca Cola page:
https://graph.facebook.com/cocacola/photos
But not for this protected page (since you must be 18+ to access this page):
https://graph.facebook.com/Betfair/photos
Recently I am experiencing this problem.
When I click to register with facebook and I am logged in as a user, I can see my information correctly. But staying on the same page, if I log out from facebook in some other tab and click Register with facebook on my own site, I see this person profile picture. The url of this image is:
http://graph.facebook.com/undefined/picture?type=large
I am accessing graph API using APP
Kindly advise me the solution to the problem
Accessing a users data requires an access token, with out this token your call is getting undefined returned as a user, and with out the access token appended to the picture url it returns emphamous Unknown User.
refer to: http://developers.facebook.com/docs/facebook-login/access-tokens/
for requesting access tokens, and usage.
Example Only: https://graph.facebook.com/ShawnsSpace/picture?type=large&return_ssl_resources=1&access_token=users_access_token
My script cannot access FB script without Access token
FB.login(function(response)
{
//If the user is succesfully authenticated, we execute some code to handle the freshly
//logged in user, if not, we do nothing
if (response.authResponse)
{
FB.api('/me', function(response) {}
}
{scope:'email,user_events,friends_photos,user_about_me,user_birthday,user_hometown,user_location,user_location,user_relationships'}); });//fbclick
So, I think access token condition is already satisfied.
I'm having an issue that I've seen in a couple of places, but with no real resolution.
I'm attempting to view my friends' checkins using the /checking api. I'd prefer not to use fql, as proposed in this answer: Graph Checkin method returns empty data, because I'd like to have all of the user/place/checkin meta data in one call.
I've tested the call using the access token that all the examples on the Graph API docs site use (http://developers.facebook.com/docs/reference/api/). When I use that access token on this url:
https://graph.facebook.com/103309013088837/checkins?access_token=ACCESS_TOKEN
I get back a result with one checkin.
However, when I use the token I've generated via my app on the same url I get an empty data set. I've confirmed that the permissions on both tokens are the same using the /me/permissions call and that other calls return the same result for both access tokens.
Is there something that needs to be configured on the app side? Is there anything else I could be doing incorrectly?