I'm creating a Metro App for Windows 8 with HTML5 and JavaScript, that needs to post a picture on the user's wall.
I'm using Windows Authentication Broker to get the access token, and with that I can get the user data.
The problem is I can't use Facebook SDK for Javascript in a Metro app, that includes the calling to Graph Api to make the post.
So, how can I post something without this? Can I use the way that Windows proposes to sharing data? That is using a DataPackage (http://msdn.microsoft.com/en-us/library/windows/apps/hh465261.aspx )
If it's possible... How can I do this?
You don't need to use the Facebook Javascript SDK. If you already got the token, you are half way there.
You should send an HTTP POST to "https://graph.facebook.com/USER_ID/photos" with the access token (you must have publish_stream permissions). Facebook API Docs > Photo
To send an HTTP post you can use WinJS.xhr() or jQuery.ajax() if you are using jQuery.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With