How to invite friends using facebook? - facebook

Note: dont think it as repeat of any other similar questions.
We have options to display the 'Invite Friends' dialog using Legacy FBML and javascript (it also uses FBML) and they are working fine.
As facebook states that these FBML are going to be deprecated, is there any other better to way to Invite/ send requests to friends to join an application ..
I'm in the initial phase of my db app development and dont want to use the to be deprecated stuffs.. Is there any option using GRAPH Api?
Edit: I'm using PHP SDK for this app development and is there any function we could use from that?

The requests dialog is currently the only non-deprecated method of inviting your friends to a Facebook application. I doubt there will be a graph api method to create them as it would seem to be too easy to abuse, but getting, clearing and deleting them are available with the graph api.

Related

How to Support Facebook SDK for Unity on Mobile Platforms, Without having Facebook Canvas?

I am using Facebook-unity-sdk to for getting list of users friends.
but i am not being able to get any data.
i also tried open graph explorer to fire graph API
the results were as follows
Is there a way i could use some Graph API endpoint other then "invitable_friends" to retrieve list of all friends of user?
No, you can not. there is no other endpoint.
well.. as far as i understood your question you can do one thing.
Just add a platform(app on facebook) in your app settings, and when it asks you about "Canvas URL" just put any random website URL and save settings.
now check if the "invitable_friends" is working or not.
PS:-
You don't have to run by the rules every time. :)

Facebook Graph API, mark inbox as read?

Okay I think the title pretty much sums it up but I'll explain my situation anyway. I have written a desktop app using the Facebook C# SDK and Graph API which notifys me when I have new notifications and new (unread) messages in my inbox and it seems to work but the facebook graph api even when I use Facebooks Graph API explorer to get /me/inbox (this is specific to my facebook account) has an inbox thread that is marked as unread but does not show up on facebooks website or any of the Facebook apps i use (android/iPhone) so I can see in the api explorer everything about the thread and theres a message under the "message" field but doesn't have anything in "comments". Anyway my problem is when I use this new app i've written this keep showing up and as it doesnt show in messages on facebooks website or the facebook mobile apps, I cannot mark it as read. So is there a way to do this manually using the graph API even just so I can do it with the api explorer because I dont want it forever showing in my app, I know that i can mark notifications as read this way but I cannot work out how to mark this inbox thread as read. I could always hardcode the thread id into my app and tell it to ignore it but this is an extremely unelegant solution especially considering I am not the only person who will use this app. Even a way to delete the thread completely by graph API, is this possible?
EDIT: I have tried POST https://graph.facebook.com/(thread_id) with fields "unread": 0 but that did not work
No, there is no permissions in the current APIs that Facebook has available other than Read-Only access to a user's Inbox.

Can I use some API call to invite User's Friends?

I want to invite facebook friends to my app. via some sort of API call whether rest or PHP Sdk, so is there a way to do so. I know about multifriend selector in FBML but don't want that. Please tell that which API can be used to do so? Graph API or any other? I am using PHP so if you know some PHP API call then that is also good.
thanks in advance for assisting me.
You can use the Requests Dialog for invites. This will prompt the user for which friends to send a request/invite to. This is designed to work in iframe apps, no fbml required.
http://developers.facebook.com/docs/reference/dialogs/requests/

Liking a page on behalf of a user?

I'm trying to get a user to 'Like' a page via the SDK. User is signed in and I get a valid access tokken form the cookie. My APP has asked for permissions read_stream and publish_stream. I can successfully do things like post to their wall, etc. But when my APP tries to 'Like' a page, I get the error back:
OAuthException: (#3) Application does not have the capability to make this API call.
Am I missing some other permission, or is there a setting I have to turn on in my APP? I'm at a loss here.
You can't like a Page on behalf of a user (Bugzilla discussion). You can, however, like posts, comments, and photos on behalf of a user.
Edit 7/9/2012
Since bugzilla no long exists, the bug linked above is inaccessible. Google doesn't have a cached version of the page, so I ran another search. The best thing I could come up with was this Google Code Discussion regarding the ActionScript API.
Facebook makes brief mention of Publishing likes via the Graph API in the documentation, but doesn't say one way or another whether you can like a Page on behalf of a user - just "Objects" which (probably arguably) are not "objects" in Facebook-lingo.
My thought is, the API to like page is available, but is only offered to white listed applications (such as, the Facebook iOS and Android applications) written by "special" publishers. There's obvious reasons why Facebook wouldn't want/allow developers to create like connections on the graph. It would be taken advantage of by spammers and other nefarious developers and would deteriorate the meaning of what a "like" represents for a page on Facebook.
My guess is, you'd have to make a pretty strong case to Facebook about why you need/want access to the Page's Like connection (for publishing) before they'd even consider giving you access. I'd also guess that they'd want to verify that you're doing only user initiated like creations (in such a way that the iOS application would handle it) so as to protect the reptutation/meaning of a "like" action.
Actually this is NOT true, but you have to do a complicated Javascript / UIWebView process in order to display a Facebook 'page' of JUST the like button on your view, and this like button you can configure in the JavaScript / Objective-C (using string replacement) to be any Facebook page url you like.
Facebook's platform policies don't allow for a web-based like button aside from using the officially supported options
Those options doesn't require using OAuth or the Open Graph api. However, facebook just added support for mobile apps to send like actions through opengraph.
I'm not sure if they intend to allow sites to customize their like buttons or just apps...
Liking works for me with the iOS SDK using the graph api:
https://developers.facebook.com/docs/opengraph/actions/builtin/likes/

Using both Facebook Graph API and Old Rest API? Please help!

I am developing a Facebook application that will use Facebook events.
I want to be able to create and edit event as well as invite users friends to the event.
I prefer to use the new Graph API to handle all connections with Facebook and I many ways I am able too, but, the Graph API cannot send invites.
I saw that the Old Rest API got far more ways to interact with Facebook so I tried to use both systems on the same time but when I send the Access token that I have created with the Graph API a long with a call to the old API it says "Invalid OAuth 2.0 Access Token".
My question is, is there a way to convert the new Graph API access token to be used with the old rest API? Is there perhaps another way to get both systems to work in the same application?
Please help! All input are welcome.
I´d recommend against the old REST api. Support will be canceled sooner or later and then you will have to port to graph api anyway.
To send invites to your app you can use fbml/xfbml. try the http://developers.facebook.com/docs/reference/fbml/multi-friend-selector togehter with the JavaScript SDK as described here: http://www.takwing.idv.hk/tech/fb_dev/jssdk/learning_jssdk_11.html
good luck!