Simple FaceBook Integration
Integrating with Facebook is simple if you are building a web app. The following page describes how to integrate Facebook with a standard web app only.
If you wish to integrate with Facebook whilst using our App Shell, you will need to be very familiar with the Facebook APIs and their Javascript SDK. This is because Facebook has strict guidelines on how they allow their platform to be integrated with others. Any App wants to utilise features of the Facebook platform must be registered with Facebook, whether they’re native mobile, desktop or mobile web apps. The Facebook Developers Site can assist you should you wish to do this - and our own Support Team.
The following are some useful links you may wish to bookmark. They are not necessary for this module.
The Like Button
Adding a "Like" button to an Interaction is as simple as embedding the iFrame code (URL version) generated by FaceBook into a message Interaction. The code provided by Facebook takes little customisation:
http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fyourwebsite%2FFBLike%2F&width=250&height=80&colorscheme=light&layout=standard&action=like&show_faces=true&send=true&appId=26450472544
This will add a Like button wherever the code is placed within the HTML:
and when the user clicks it - it will show a 'Like' on their Timeline.
Example:
The previous example used this code:
Sharing on FaceBook
Simply the add the following to your mADL (or Message) Interaction:
You should get something similar to this:
In a message Interaction, simply place this code:
<a href="#" onclick=" window.open( 'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href), 'facebook-share-dialog', 'width=626,height=436'); return false;"> Share This on Facebook! </a>
To get something that might look a lot like this: