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

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!

Related

What choose Instagram Graph API or old API

I wonder if it is possible to use a new Instagram Graph API only for hobby purpose(small java application). The main aim is to process only user's data that is currently log in on instagram(not other's user data). Generally I'm a beginner on this field and I try to determine my chances for writing this kind of application, because I've read that sometimes it is hard to get permission to API from facebook, so maybe somebody know how it works in practice?
From what I can tell on the docs site, the Graph API is only used if you're making something for Business Accounts. The docs say that if making something for non-business users, to use the old API.
Reference here: https://developers.facebook.com/docs/instagram-api
I personaly suggest you to use new graph API, because older API support may be disabled in future and might be deprecated in future.
Moreover, Facebook does not give permission easily but you give proper & exact content if allows you and provide great support.

How to invite friends using 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.

Post status update to Page Wall

I'am really new to all this Facebook development, and I wanted to integrate Facebook within my personal website.
I am now trying to test if what I want is possible.
I want to post a status from my server, via php/js to my Page in Facebook.
How can I do so?
B.W.
I saw that there is this FBJS function called "Facebook.streamPublish"
But I don't know how to integrate it.
Is there any possible way to do so?
Can you give me an example?
-Secondly, what is an access token?
You get an access_token after facebook authenticates you. You will need this access_token for all subsequent API calls. You can find the details here:
http://developers.facebook.com/docs/authentication/
You can use graph API for publishing on the wall and doing other allowed actions. Details of publishing api can be found here:
http://developers.facebook.com/docs/reference/api/post/
But do have a look on the facebook policy, because publishing automatically to a wall is considered violation.
http://developers.facebook.com/policy/

How do I publish an activity on facebook using the Graph API

The old Facebook Legacy REST API had a function dashboard.publishActivity, however the new Graph API only allows messages to be posted on /me/feed.
Is there a way to send activities using the Graph API?
As mentioned in http://developers.facebook.com/blog/post/552/ Facebook "have removed the section which displayed the News that developers published via the Dashboard APIs in the Games Dashboard". Therefore the dashboard.publishActivity function no longer provides any useful functionality. My recommendation is to switch to either using stream posts or to Requests 2.0, as these will provide the same sort of distribution that you're looking for.

Which Facebook APIs can be used to programatically post a message?

I have an application that allows a user to post messages. I'd like to give an option to users to propagate the same posts on their Facebook wall / status. Which Facebook APIs can I leverage, including the ones that are need to authenticate the user?
You can use Facebook's JS API (useful for client-side), the new Graph API, or the old REST API. Facebook has extensive documentation at http://developers.facebook.com/docs/
The easiest path is probably to use the Facebook.streamPublish() function through the FBJS API.
You can also use streamPublish() through direct Facebook API calls, but you need extended permissions. Using FBJS, Facebook will display their own prompt to the user, so you do not need extended permissions.