Friday 12 July 2013

Creating Channels in Facebook

Adding your video channel to Facebook is easy - just take the code from the Player Builder and cut and paste it into a Facebook tab:




Here are the instructions from Facebook on creating a tab based application to host your code:
Using iframes in Page Tabs
Many useful applications have been built for Facebook Pages like BandPage for artists to share their music with fans andShop Now to help Pages sell merchandise on Facebook. As of today, you can build your Page Tab apps using iframes rather than FBML. This means you can now build apps that run across Facebook (including Pages and Canvas applications) using the same simple, standards-based web programming model (HTML, JavaScript, and CSS). In addition, you can easily integrate social plugins and the Graph API within your tab.
How to Add an iframe Page Tab
Enable iframes by editing the Facebook Integration settings on the Developer App
Specify a Tab Name and a Tab URL that is loaded when the user selects your Tab on a given Facebook Page. Finally, to add the app to a Page, an admin of the Facebook Page must navigate to your app's Profile Page and select "Add to my Page.” You can see step by step instructions in our guide.
Updated signed_request
When a user lands on the Facebook Page, she will see your Page Tab added in the left-hand menu. When a user selects your app in the left-hand menu, the app will receive the signed_request parameter with one additional parameter, page, a JSON array which contains the ‘id’ of the Facebook Page your Tab is hosted within, a boolean (‘liked’) indicating whether or not a user has liked the Page, and a boolean (‘admin’) indicating whether or not the user is an ‘admin’ of the Page along with the user info array. If a user has authorized your application, the signed request will also contain an access token and the user id for the current viewing user so you can personalize your application for them.
In addition, your application will also receive a string parameter called app_data as part of signed_request if an app_data parameter was set in the original query string in the URL your tab is loaded on. For the Shop Now link above, that could look like this: "http://www.facebook.com/MollySimsOfficial?v=app_135607783795&app_data=any_string_here". You can use that to customize the content you render if you control the generation of the link.


{
   "algorithm":"HMAC-SHA256",
   "expires":1297328400,
   "issued_at":1297322606,
   "oauth_token":"OAUTH_TOKEN",
   "app_data":"any_string_here",
   "page":{
      "id":119132324783475,
      "liked":true,
      "admin":true
   },
   "user":{
      "country":"us",
      "locale":"en_US"
   },
   "user_id":"USER_ID"
}


The result should look something like this: https://apps.facebook.com/vzfbpsurf/