Facebook Email Messages - How to Retrieve with API - facebook

If someone sends me a note using the facebook email feature (myname#facebook.com), how do you get this message using the API? Is it possible? I can see it in my Private Messages, but it doesn't seem to be coming over when I use FQL to query that table. Is it possible to get these messages?

You can use the Graph API to do this:
$data = $facebook->api('/me/inbox');
Check out: http://developers.facebook.com/tools/explorer/?method=GET&path=me%2Finbox

You need to request the read_mailbox permission from the user. With this permission you will be able to access the messages in the users inbox.
You can read more about facebook permissions at this link.

Related

Facebook Graph API: read messages in v2.8

since read_mailbox is deprecated, I was wondering if there's still a possibility to get all of my messages via API or any other service?
/v2.4/{user_id}/notifications operations as well as read_stream, read_mailbox, and manage_notifications permissions are deprecated in v2.4.
Thanks in advance!
No, there is no possibility to get access to the user messages anymore, you can only get messages of a Page with the conversations endpoint.

Facebook Graph API: shouldn't /userId/subscribers list subscribers for non-friends?

From the docs: https://developers.facebook.com/docs/reference/api/user/#subscribers
I was testing on Graph API Explorer and noticed that I can't get the public subscribers list from a non-friend person through that API connection even when I can see them via http://www.facebook.com/userId/subscribers page.
It retrieves only the summary info with total_count, nothing on data. Am I missing something or it's unsupported by design?
Thanks!
Yes this is by design, the API doesn't reflect the public interface, it's best not to think about it like this. Always see the permissions needed
You can read the subscribers for a user for your app by issuing an HTTP GET request to /USER_ID/subscribers with the user access_token with the user_subscriptions or friends_subscriptions permission.
So as it says you can only read the authenticated user and the user's friends with the correct permissions.

Sending email notification via GRAPH API Facebook

Does anybody know how to send a notification email via GRAPH API. I found some code in REST API like (notifications.sendEmail) but is there something in GRAPH? Thank you.
No, there is no equivalent, and no plans to add one.
From the Facebook Documentation:
Please note: We are in the process of deprecating the REST API,
and will not be adding support for this in Graph API.
Developers should directly send email to users once they are granted permission.

Is there an API implemented to invite an array of friends to a Facebook Group?

I've been working for about an hour trying to figure out how to invite friends via API methods, however I don't see any documentation. Is there a current method I'm just not finding?
No, there is currently no Groups API that can do this
Try sending a POST request to
https://graph.facebook.com/GROUP_ID/members?userids=USER_ID1,USER_ID2&access_token=ACCESS_TOKEN
The manage_groups permission must be granted for this request to work

How to get the list of friend_request using facebook API

How to get the list of friend_request using facebook API.
For example, user A,has logged in.
Use B send request of adding friends to A
Now, I want to get the friend_request of user A, how to do?
May the facebook graph API could not support the operate, yes or not?
At the same time, I would like to use FQL as below,
SELECT uid_from FROM friend_request WHERE uid_to=204686
(http://developers.facebook.com/docs/reference/fql/friend_request)
But, how to send the FQL to facebook server?which url?
like this:https://api.facebook.com/method/fql.query?query=select .... &access_token=....format=json... yes or not?
any other idea?
Thank you!
Simon
If you are using Java then why not use one of available Java Facebook APIs? Let API worry about which request to send where. Currently I am using RestFB API, there are plenty of examples on their site including how to execute FQL.
UPDATE
Ok, if you have to send requests manually then sending them using URL you provided is correct. Just remember that you would need to encode your FQL query before sending it as a param (URLEncoder in java would do the trick). You can play with the queries on this page and it will show you how your request should look like and what is returned.