- This topic has 6 replies, 4 voices, and was last updated 11 years, 7 months ago by Brandon.
-
AuthorPosts
-
BrandonMemberFacebook Integration Part 1 – Share to Timeline
Sharing to the time line is actually pretty easy.
First you need to register your app with Facebook. For this you will need some information and graphics.
First login to facebook and goto to: https://developers.facebook.com/apps
And create a new app. You will need the domain you are hosting the app on as well as some icons and banner images.
Icons: 16×16, 75×75, 128×128
Web Banner 150×100
Cover image: 800×150
You will also need to select how the app intergrates, usually Mobile is fine for a web app.Once the app is created you really just need the App ID.
In Mobione add the following url as a new javascript library in the main settings.
htp://connect.facebook.net/en_US/all.jsOnce that is loaded select the item you want to activate the share, button or image.
On the item make the On Click action Run Javascript.
Select the following and enter it in the code area and add your information//Initialize FB.init({appId: "YOUR_APP_ID", status: true, cookie: true}); // calling the API ... var obj = { method: 'feed', //URL to your app redirect_uri: 'http://yourapp.com/url', link: 'http://yourapp.com/url', //for icon image, you can delete picture: 'http://yourapp.com/urlimages/object.png', name: 'Your Title for the post', caption: 'Caption under the title', description: 'description of the post' }; function callback(response) { document.getElementById('msg').innerHTML = "Post ID: " + response['post_id']; } FB.ui(obj, callback);
You should now be able to run it and share the link you included.
paulDMemberGreat to see users posting tutorials. Thanks for taking the time to do this.
BrandonMemberpaulD
Thank you. Hopefully people find it helpful. I am planning a couple more Facebook ones, not sure if there is any official support (widgets) planned.
virtualmasterMemberwhat if its a native app how do you callback?
BrandonMemberI’m not completely sure as I have mainly been doing web apps. From what I have read you can still use a url on your server with php return.
Unknown AuthorParticipantAnyone managed to do Facebook integration w/ native iOS apps?
Looks like all the Facebook URL schemes are now broken.
-1TC
BrandonMemberIve almost given up on Facebook, they change their stuff so much it makes it really difficult to keep up.
-
AuthorPosts