I am trying to send request for newsfeed to fql through Graph API Explorer on developers page, I am surprised to see that response i got doesn't match fully the news feed on facebook page also the news feed on ios app for facebook. It gets more confusing when i post request through url which responses with totally different list in XML, which shows something extra which doesn't show on my news feed on facebook page.
the query i send with fql from Graph API Explorer
SELECT post_id, actor_id, target_id, message FROM stream WHERE filter_key in (SELECT filter_key FROM stream_filter WHERE uid=me() AND type='newsfeed') AND is_hidden = 0
and through URL i send
https://api.facebook.com/method/fql.query?query=SELECT%20post_id%2C%20actor_id%2C%20target_id%2C%20message%20FROM%20stream%20WHERE%20filter_key%20in%20(SELECT%20filter_key%20FROM%20stream_filter%20WHERE%20uid%3Dme()%20AND%20type%3D'newsfeed')%20AND%20is_hidden%20%3D%200&access_token=<access token>
I am searching for answer for a week now an i didn't find nothing useful, tried this from other account and i see same problem.
I tryed also to see what facebook app for ios request and i got a link which looks like this
https://graph.facebook.com/graphql/
with a POST parameters
sdk_version=3
format=json
app_version=40121
q=node(1033280756){home_stories.environment(iphone).first(5){edges{deduplication_key,...<in very long query>
locale=en_US
method=get
sdk=ios
access_token=<access token>
but testing it with Graph API Explorer with access token from GAE i recieve message
{
"error": {
"message": "(#803) Some of the aliases you requested do not exist: graphql",
"type": "OAuthException",
"code": 803
}
}
this only works and response totally match my news feed from facebook page when i gave access token from my ios facebook app and when i try to get access token through https://www.facebook.com/login.php?api_key=6628568379 i receive the same error.
I cant understand is this a bug in table or this isnt the way how you get news feed like facebook gets?
Did anybody got any official answer from facebook?
Related
I'm trying to use this endpoint from the Instagram graph api:
GET /ig_hashtag_search?user_id={user-id}&q={q}
Documentation for this endpoint can be found here.
I'm running this GET request:
https://graph.facebook.com/v14.0/ig_hashtag_search?q=coke&transport=cors&user_id=<my_user_id>&access_token=<my_access_token>&q=coke
and get this as response:
{
"error": {
"message": "(#200) Requires instagram_basic permission to manage the object",
"type": "OAuthException",
"code": 200,
}
}.
The user id comes from my instagram account and the access_token that I'm using is a User token generated with "Graph API explorer" and I can see that this token has the scope "instagram_basic" when using the "Access Token Debugger".
I can't understand why this does not work? Do I really need to submit a API review just to test the hashtag endpoint during development?
Please help!
I guess sometimes App review team of Facebook doesn't know what is the usage of the permission so they just decline the submissions randomly. I got that permission like 3 months ago and i checked my app review. I send them this text
We are going to use instagram_basic to read an Instagram account profile's info and media. We will get the basic metadata of an Instagram Business account profile like "USERNAME", "ID", "FOLLOWERS", "FOLLOWING". You can check the Screescast to see how we use the instagram_basic on our app.
Here is what they saw while they do the app review
Also be careful while you send requests, keep in mind to change it to development mode. Some of the endpoints works only in live mode. The API still changes a lot and there are tons of bugs i see in my project. I hope this helps.
My task is to get photo data of my business Instagram account with Instagram Graph API. I followed the instruction from Instagram Graph API -
https://developers.facebook.com/docs/instagram-api/reference/user/media
, which said request like
GET http://graph.facebook.com/17841405822304914/media
can get photo data from the Instagram account linked to the FB account in JSON format.
I tried to send GET request /my_facebook_id/media as said by the document with Graph API Explorer on FB developer platform but it failed to return the data I want.
This is the error I got:
message: Tried accessing nonexisting field (media) on node type (User)
type: OAuthException code: 100
Does the message mean the media field doesn't exist in the FB user?
What is the meanIng of error code 100? I can't even see that in FB official document.
I tried to use the Instagram business account ID for this request but I got an error message said the user object doesn't exist
How to get the task done? Thanks!
I guess you have missed creating a Facebook business page and linking your Instagram Business account to it.
Here is the guide to setup : https://developers.facebook.com/docs/instagram-api/getting-started
If this was done correctly and still you're facing the error is because of a Facebook bug where your account doesn't get linked correctly.
Here : https://developers.facebook.com/support/bugs/177912116363088/?disable_redirect=0
Solution : Please disconnect your Instagram account from your page. Then, on Instagram app, in setting you will have to switch back to personal account and reconvert to a business account
Note : Switching to a personal account you will lose the insights of your media.
Once this is done you should be able to get instagram_business_account and post which you can run your query to fetch the media :
GET http://graph.facebook.com/you-instagram-business-account-id/media
trying to figure out why I cannot post to Facebook Page (not profile) with Open Graph API.
I have submitted for review and got approved an action. I have permissions approved, such as:
manage_pages
publish_actions
publish_pages
When I make a post to facebook profile eveything is working fine:
https://graph.facebook.com/me/com-domain:post?access_token={access_token}&method=POST&property={url}&message=test&fb:explicitly_shared=true
The problem appears to be posting to Facebook Page.
First of all I am making request to /me/accounts and getting proper PAGE ID and Page access token.
https://graph.facebook.com/me/accounts?access_token={access_token}
After that, grabing new access token and page id making another request to
https://graph.facebook.com/{PAGE_ID}/com-domain:post?access_token={page_access_token}&method=POST&property={url}&message=test&fb:explicitly_shared=true
And getting result:
{ "error": {
"message": "Unsupported post request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"fbtrace_id": "Ffdsfds" }}
Any suggestions ? Thank you!
After talking to Facebook support it appears that it is not possible to post via custom actions to Facebook Page. Only to profile. Case closed
I have a user who can manage some Facebook Page. I've got access token with all permissions, including publish_actions as written here.
When I send a POST request from Graph API Explorer to <page-id>/feed specifying message and access_token of course, my post appears in Page Feed and author of this post is Page. But when I send a POST request with link instead of message it appears in 'recent publications from others' with my name.
What have I done wrong?
I'm seeing the same thing. If I send a message to <page-id>/feed it will work fine. But if I send a link to the same endpoint it posts on the
Is there any way to get notifications of a managed page just as it can be done for users?
For a user I'd trivially trigger a GET request to /me/notifications. I've tried doing the same for a managed page (using the access token provided by /me/accounts), that is triggering a GET to //notifications?access_token= but I get a "Unsupported get request" error message, which I guess means that the notifications connection is not available for pages.
Is there any way to get this via Graph? The web page has a notifications link/shortcut for each managed page.
Per the graph API Explorer, here are the connections you can access of the page, and unfortunately notifications is not currently on their list:
albums
events
feed
links
notes
photos
posts
questions
statuses
tagged
videos
However, you could try fql?q=
SELECT notification_id, sender_id, title_html, body_html, href
FROM notification
WHERE recipient_id=me()
EDIT
I used a valid PAGE access token and was able to get back data....
{
"data": [
{
"notification_id": "nnnnnnnnnnnn",
"sender_id": nnnnnnnnn,
"title_html": "xxxxxxx posted on Beer's timeline.",
"body_html": "",
"href": "http://www.facebook.com/permalink.php?story_fbid=nnnnnnn&id=nnnnnnnn"
}
]
}