Consult mailbox_folder Error (FQL) - facebook-fql

I need to consult direct messages from a fan page, run the following FQL
https://graph.facebook.com/fql?q=select folder_id from mailbox_folder where viewer_id = <my fanpage id>&access_token=<My page access token>
but the request return the next error:
{
"error": {
"message": "(#606) You can only fetch messages for one user",
"type": "OAuthException",
"code": 606
}
}
How to fix it ?

Use the conversations endpoint in the Graph API
/PAGE_ID/conversations
https://developers.facebook.com/docs/reference/api/page/#conversations
I don't think there is an FQL equivalent for pages yet.

Related

Get facebook album give error code 100

I use simple app but cannot understand next:
Opened 2 urls:
https://www.facebook.com/media/set/?set=a.675416519138045.1073741830.660049570674740&type=3
AND
https://www.facebook.com/joyasmariajose.valdivieso/media_set?set=a.383620231706322.80737.100001750452794&type=3
When I use Graph Exploder:
GET \675416519138045
return all information about album in this user
But When I try
GET \383620231706322
I can get only user_id and name. On the album have next error:
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"fbtrace_id": "Hb9lKBi2Wpz"
}
}
Question: What can be wrong with second url ?
Unsupported get request usually means that you can't access that resource without an Access Token, i.e. you don't have permissions to this object, as #CBroe said.

How can i get the mutual friend from facebook using facebook graph API?

I am trying to fetch the facebook mutual friend using facebook graph API but getting getting error only.
This is url that i am trying to hit
http://graph.facebook.com/109557?fields=context.fields%28mutual_friends%29
Here is its Response :
{
"error": {
"message": "(#12) context field requires version v2.0 or higher",
"type": "OAuthException",
"code": 12
}
}
As #CBroe said, you should try
https://graph.facebook.com/v2.3/{user_id}?fields=context.fields%28mutual_friends%29

How to get message shares?

I try to get shares object from messages sent between two users.
According to Facebook documentation I should use the method /{message-id}/shares
https://developers.facebook.com/docs/graph-api/reference/v2.2/message/shares
But when I tried this with an user with read_mailbox permission I get the following error :
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100
}
}
I use message's id retrieved with request /me/inbox
I am missing something ?
Use the following format /m_mid.$cAAGZr4WGacdkQBX_21eDtC3iV6w9/shares

Facebook: How do I retrieve all reviews I have ever posted?

I would like to be able to get all reviews that I have ever posted on Facebook. I have tried it via the Graph API Explorer with no success, in FQL Query:
SELECT review_id FROM review WHERE reviewer_id=me()
This returns an empty JSON object.
In Graph API me/reviewsreturns:
{
"error": {
"message": "Unsupported get request.",
"type": "GraphMethodException",
"code": 100
}
}
Is it possible at all or am I wasting my time?
Thanks

How to get a user's friend list from graph api without authentication?

I can see a user's friend list in facebook.com but I can't get this by graph api. I use this fql in "Graph API Explorer" :
SELECT uid1 FROM friend WHERE uid2=100002756991450
but it tell me:
{
"error": {
"message": "Error validating access token: Session has expired at unix time 1358668800. The current unix time is 1358677687.",
"type": "OAuthException",
"code": 190,
"error_subcode": 463
}
}
How can I get a user's friend list without authentication?
This is Not due to authentication, this is because user's session has been expired, So generate new access token and use it.
You could get this error.
{
"error": {
"message": "Can't lookup all friends of 515977793 due to user's privacy settings.",
"type": "NoIndexFunctionException",
"code": 604
}
}
if user has a privacy.