Can you do a "stream.get" from Facebook Javascript SDK? - facebook

I am trying to build a cross browser extension with Crossrider which fetches the Facebook Stream and shows it on Google+.
Everything is set, the Facebook App, the connect itself, but the only missing piece in the puzzle is "stream.get" which I can't find how to call this API method with the JS SDK.
Is this possible at all ?
Thanks!

You can access https://graph.facebook.com/me/feed with an access token with the javascript api which is the graph replacement for stream.get. You could also run a FQL query against the stream table. Both I believe would need "read_stream" extended permission.

Related

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.

Facebook Graph API

Can I use the Facebook Graph API without the creation of my Facebook Application? As I understand it, for each operation I need to use the OAuth key. And I can only get user OAuth key if they authorize my Facebook application. Am I right?
I need to get user feed, and post to it.
Facebook Graph Api needs your APP ID which you can only get from your Facebook application. So i think its not possible to post data on facebook without having Application ID.
You can use this tool to dynamically generate an access_token for testing: https://developers.facebook.com/tools/explorer/
Also, check out RapidAPI here. I've specifically linked you to the FacebookGraphAPI block. Here you can instantaneously connect to numerous Facebook endpoints. The platform will generate a code snippet that you can directly insert into your code.
Depends on what you want to do, for most tasks you have to have an app id... but If you want to get the amount of shares for a certain page, for example, you can do it with no app ID.
I think there is FBML (facebooks mark up language) which you can embed on your site which can handle some basic tasks like commenting or liking.
No, You can't do that as Facebook Graph API needs access token which u can get only by authorising your logged-in user by your (Created) App in Facebook.

Offline access to FB graph api from Javascript SDK

How do you query facebook's graph api via the javascript sdk for users that have allready given you permissions (offline access) and whose auth data you have stored, but who are not currently logged in to facebook?
To answer my question, you can in fact do so. You can use FB.api calls and include the access token at the end of the URL with ?access_token=
I'm not 100% sure of the code you'd need to actually do it, but I think one of the key elements to this would be logging in to the SDK as an application, rather than a Facebook User, as detailed in the documentation # http://developers.facebook.com/docs/authentication
Have you got an example query that you'd like to make with the SDK?

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.

Publishing a stream using the Facebook API in PHP?

I am currently developing a facebook app and I would like to now how to publish to the users wall...
Thanks alot
If your app is FBML i would suggest using the FBJS call:
Facebook.streamPublish
This is not a php solution but it is more reliable as it doesn't require the current user to have accepted facebook stream permissions for your app.
For iFrame apps/ FB Connect the following is available FB.Connect.streamPublish
Otherwise you can use the Stream.publish rest api call available in:
$facebook->api_client->stream_publish
although this requires accepted app permissions