Equivalent scrapbook

…article on Facebook graph api avalibility that developer has

investigation on facebook images

  • image max size is 90x90
  • image can be small like 1px and facebook will resize the post message
  • the optimum small image size is 10px for width (to be align with ico)

myths:
* if you post to facebook with caption " " (emty whitespace) image will be ignored
* this is a myth, maybe it will just won't download images from server but image provided with picture parameter will be displayed. Same thing for blank caption

investigation on what developer can get/post from/to facebook done on September 12 2011

Some notes before digging to deep

  • requests must be https

you can discover information about user by just typing (id or username) more

https://graph.facebook.com/68310606562

source

How to discover your facebook id

in your profile, see the url of link on your profile picture

https://www.facebook.com/media/set/?set=a.1111111111111.7222.1346525790&type=1

the number before &type

https://www.facebook.com/media/set/?set=a.1614538647140.79299.thisnumber&type=1

What informations is developer capable to catch from FB

If you fetch informations with correct access token but there is no data, or the ID doesn't exist you won't get error message but empty Data array

    {
       "data": [

       ]
    }

Publicly accessible informations

Note: direct url depends what the id is, for instance https://graph.facebook.com/123 can be user but https://graph.facebook.com/1234 can be fan page, so more direct url id examples are listed in facebook api homepage. Also the id must be publicly accessible

Accessible informations with access token from user

Note: more informations we want to access, longer the permission request is when user is confirming us permissions in dialog.

Status messages

fb api on statuses

by calling

https://graph.facebook.com/STATUS_ID?access_token=ACCESSTOKEN

we can get:

  • status message,
  • comments (this is limited)

eplorer

{
  "id": "137930202969605",                           #id of status
  "from": {
    "name": "Testero Emil",
    "id": "100002578784532"                          #fb user id 
  },
  "message": "tteset",
  "updated_time": "2011-09-13T10:37:23+0000",
  "comments": {
    "data": [
      {
        "id": "137930202969605_263335",
        "from": {
          "name": "Testero Emil",
          "id": "100002578784532"
        },
        "message": "coment 1",
        "can_remove": true,
        "created_time": "2011-09-13T11:12:18+0000"
      }
    ]
  },
  "type": "status"
}

by calling

https://graph.facebook.com/STATUS_ID/comments?access_token=ACCESSTOKEN

we can get

  • all comments

eplorer

{
  "data": [
    {
      "id": "137930202969605_263335",
      "from": {
        "name": "Testero Emil",
        "id": "100002578784532"
      },
      "message": "coment 1",
      "can_remove": true,
      "created_time": "2011-09-13T11:12:18+0000"
    }
  ]
}

by calling

https://graph.facebook.com/STATUS_ID/likes?access_token=ACCESSTOKEN
  • all likes

eplorer

{
  "data": [
    {
      "id": "100002703790608",
      "name": "Fakemaio Seram"
    },
    {
      "id": "100002578784532",
      "name": "Testero Emil"
    }
  ]
}

friends

graph api command explorer - tool for testing fb access token & fetching informations. Not all functionality is available.

https://graph.facebook.com/ID/CONNECTION_TYP

fb provide

Posting on FB

we can post to

posting on feed

successful

error

    {
      "error": {
        "type": "OAuthException",
        "message": "(#506) Duplicate status message"
      }
    }

graph api command explorer - tool for testing fb access token & fetching informations. Not all functionality is available.

Tools

Summary

As developer there is possibility to fetch many informations from facebook user as long you have the permissions. We can fetch user statuses, family members, photo tags, likes, groups they belong to, events, notes, posts, comments and responses (comments, likes) for them. We can also post on wall of an user, but not on his friends wall ( because we don't have auth. token for them). We can comment actual posts, and responses to those posts.

There is possibility to create interface where we will be fetching comments from facebook and adding them to conversation on our site and even opposite way, sending to the wall post responses that people commented on our site. However this is not ideal because we can only post comment for those users whose auth. token we already have. Other people comments we must post as "service comments" = the person who will comment on FB will have the f.e. "site name" not the real name of person whose token we don't have

links

https://developers.facebook.com/docs/reference/api/
http://www.fbrell.com

https://developers.facebook.com/tools/explorer