Facebook Graph API - How to read posts privacy - facebook

I read the example of Graph API document at this: https://developers.facebook.com/docs/graph-api/reference/privacy/, and try to get the privacy of specified post but no luck. The link I tried is:
https://graph.facebook.com/me/?fields=value&access_token=<my token>
Response:
{
"error": {
"message": "(#100) Tried accessing nonexisting field (value) on node type (User)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "DSUBZSZdJT8"
}
}
Please help me.

The error message is very clear, there is no field called "value" in the user table - which is exactly what you are trying to access with the /me endpoint. This would be the API call to get the privacy setting of a specific post:
https://graph.facebook.com/{post-id}?fields=privacy{value}&access_token={user-token}

Related

Issues with Instagram Graph API (Insights endpoint)

Trying to get Instagram insights data through the Facebook API, and keep getting the same error message. I have all the necessary permissions required, auth tokens, etc, and nothing seems to change the response. Any ideas? Here's what I get back:
{
"error": {
"message": "(#100) Tried accessing nonexisting field (insights) on node type (InstagramUser)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "A7sn36A6aleX86dUNqQa3kx"
}
}
Appreciate your help!

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.

Search users from Facebook Graph API

I'm trying to search for users on facebook with an app token. Here's the endpoint that I'm accessing with the graph explorer (I've tried both app and access tokens):
https://graph.facebook.com/v2.5/search?q=foo
Here's the error that I'm receiving:
{
"error": {
"message": "An unknown error has occurred.",
"type": "OAuthException",
"code": 1,
"fbtrace_id": "BbsgVF64X28"
}
}
Any idea what I'm doing wrong?
Look at the docs at
https://developers.facebook.com/docs/graph-api/using-graph-api/v2.5#search
You need to specify a type parameter to be able to use the search, like
https://graph.facebook.com/v2.5/search?q=foo&type=user

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

(#100) Invalid parameter OAuthException when creating event using Graph API Explorer

I am using Graph API Explorer to try and work out how to create a user event prior to coding it for real in Objective-C for an iOS app.
I have obtained an auth token which contains user_event, publish_actions and create_event permissions.
I am POSTing a request to https://graph.facebook.com/12345678/events with parameters of name set to Tester 2 and start_date set to 2013-06-27
In response I get
{
"error": {
"message": "(#100) Invalid parameter",
"type": "OAuthException",
"code": 100
}
}
I can't see what I'm doing wrong. Any help would be much appreciated.
Thanks
Andrew
It's because you need to use start_time instead of start_date.
Doc reference:
https://developers.facebook.com/docs/reference/api/event/