Facebook Cheatsheet

By Sinh Pham → Saturday, 12 April 2014

Graph API

The Graph API is Facebook's RESTful API for interacting with data from User's, Application's and Company's "social graph" or information. Some calls require authorization and some do not.

Public Information

Public information is available without authorization. Basic information about a user, for example:https://graph.facebook.com/steve.thompson You can get quite a bit more information from a page, versus a user:

Private Information

There are basically two ways to get authorization and how you use them depend on what information you are requesting:
  1. If you are making an app for a Page, that only needs access to that Page's information, you just need the appId and secret.
  2. To access a user's page you have to first get their permission using oAuth. PHP's SDK makes that pretty simple. This is what you need to do to post to their wall, access their photos, get a list of their friends, update their status, etc.

Real time updates

If you store user information on your site, or you want to have your site/app react when something changes on one of your users' accounts, you can use the Real-time Updates. Basically, you subscribe to what you want sent to you, setup a callback handling script, and then figure out what you want to do with it on your site/app.

PHP SDK

To push data back to facebook (if you have the correct permissions from the user):
$data = array(
  'message' => 'Postin to my wall'
);

$facebook->api('/me/feed', 'post', $data);

FQL

You can use FQL to do more efficient and advanced queries, as well as gain access to information that you cannot get through the Graph API.
Here is a great slideshow on FQL: http://www.slideshare.net/csaila/fql-overview

Dialogs

Dialogs let you use Facebook to post to walls on your site, without any programming. For example, you could pop open a window and direct it to http://www.facebook.com/dialog/feed?app_id=123050457758183&redirect_uri=http://www.example.com/response/&display=popup and then you'd have an instant Post to My Wall Dialog.

Social Channels

These are just Javascript SDK based methods that you can use to publish content back to Facebook. Includes a post to my wall dialog, an invite your friends dialog, a like button.

Opengraph

These are meta tags that you can embed in the
of your html that explicitly provide information about the page content to Facebook. You'd use these, for example, if you had a page about a photo and you wanted to provide a thumbnail to Facebook and a description.
You can view how Facebook analyzes a page by going here: http://developers.facebook.com/tools/lint/

Javascript SDK

I personally despise this SDK and have found it very frustrating to use in combination with the PHP-SDK. Either use one or the other.

Using Facebook for Authentication on your site

Other links

Free Apple App

I'm Free Apple App. A full time web designer. I enjoy to make modern template. I love create blogger template and write about web design, blogger. Now I'm working with http://free-apple-apps.blogspot.com/. You can contact me.

No Comment to " Facebook Cheatsheet "