facebook

Facebook Integration Part 1 – Share to Timeline

  1. MobiOne Archive
  2.  > 
  3. Examples, HOW-TOs
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #334774 Reply

    Brandon
    Member

    Facebook 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.js

    Once 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.

    #334784 Reply

    paulD
    Member

    Great to see users posting tutorials. Thanks for taking the time to do this.

    #334801 Reply

    Brandon
    Member

    paulD
    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.

    #335886 Reply

    what if its a native app how do you callback?

    #335891 Reply

    Brandon
    Member

    I’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.

    #338390 Reply

    Unknown Author
    Participant

    Anyone managed to do Facebook integration w/ native iOS apps?

    Looks like all the Facebook URL schemes are now broken.

    -1TC

    #338409 Reply

    Brandon
    Member

    Ive almost given up on Facebook, they change their stuff so much it makes it really difficult to keep up.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Facebook Integration Part 1 – Share to Timeline

You must be logged in to post in the forum log in