Equivalent scrapbook

…scrap on Facebook app development

open graph meta tags


If you use Open Graph tags, the following six are required:

og:title - The title of the entity.
og:type - The type of entity. You must select a type from the list of Open Graph types.
og:image - The URL to an image that represents the entity. Images must be at least 50 pixels by 50 pixels. Square images work best, but you are allowed to use images up to three times as wide as they are tall.
og:url - The canonical, permanent URL of the page representing the entity. When you use Open Graph tags, the Like button posts a link to the og:url instead of the URL in the Like button code.
og:site_name - A human-readable name for your site, e.g., "IMDb".
fb:admins or fb:app_id - A comma-separated list of either the Facebook IDs of page administrators or a Facebook Platform application ID. At a minimum, include only your own Facebook ID.

URL Linter" tool that will show you a preview of how your page will appear when being shared on FB, and it will force FB to instantly update its cache of your page. http://developers.facebook.com/tools/lint/

Handling expired tokens


notes from articles

  • allowing the option to reset the expiration time for existing, valid access_tokens each time a user interacts with your site.
  • When a user visits your site with an existing, valid access_token, you have the option to extend the expiration time of that access token without requiring the user to login again.

    • only once per day
    • this not apply to desktop & modile devices ... ios solution
  • when facebook is generating token it also provides expiration time

Posting with Kaola


require 'rubygems'
require 'koala'
@graph = Koala::Facebook::GraphAPI.new('tokeeeeeeeeeeen')
@graph.put_wall_post("hey, i'm learning kaola", {:name => 'Kaola is cool', :caption =>' ', :link => 'http://bofu.eu' })

Posting parameters to wall: message, picture, link, name, caption, description, source, place, tags
all and others: https://developers.facebook.com/docs/reference/api/ and find publishing

Geting informations from FB token


   "id": "100002578784532",
   "name": "Testero Emil",
   "first_name": "Testero",
   "last_name": "Emil",
   "link": "http://www.facebook.com/profile.php?id=100002578784532",
   "birthday": "11/18/1971",
   "favorite_teams": [
         "id": "170785732954184",
         "name": "Rob Machado"
   "gender": "female",
   "locale": "en_US",
   "updated_time": "2011-07-19T14:18:36+0000"

note: above data isn't my real FB user


Direct post to own wall



name: test

note: must be post !

post to friends wall

https://graph.facebook.com/ 100002413336187/feed

    link: http://developers.facebook.com/
    name: bubla
    picture: http://osaust.jpg
    caption: fererence documentation oea oeau oeau oaeu oaeu oeu oeu oeu oeu oeu oeu oeu oe uoe uoeu oeu oeu oe uoeu oe oe uo a
    description: fererence documentation oea oeau oeau oaeu oaeu oeu oeu oeu oeu oeu oeu oeu oe uoe uoeu oeu oeu oe uoeu oe oe uo a
    message: oh checkt this oute


If you wan't to post something on FB wall you have to send some params to fb

name: "this will be the title of wall post" 
link: "http/wher to go after click"

graph api, list parameters that I can send/post

keywords: posting, post

Facebook like button

you can generate tike button here (basic functionality):


to change image displayed in the FB post after clicking the FB like button, you have to add Open Graph Tags to your site, example:

<meta property="og:title" content="Eq scrapbook" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://eq8scrapbook.heroku.com" />
<meta property="og:image" content="http://eq8scrapbook.heroku.com/rails_is_ponies_and_rainbows__equivalent.png" i
<meta ="og:site_name" content="Lovethis " />
<meta property="fb:admins" content="123faceb00idoftheadminofapp567" />

!!! don't copy and paste like dummy, you can generate this code here

description is taken from meta description, to change title and website you need open graph tags

warning!! there are some realy interesting restrictions for open tag (f.e. aafter 50 you cannot chnage title) i recomend to read them here

site debbuger http://developers.facebook.com/tools/debug