http://stackoverflow.com/questions/6390745/learning-resource-for-facebook-api
http://thinkdiff.net/facebook/php-sdk-3-0-graph-api-base-facebook-connect-tutorial/
http://ow.ly/url/shorten-url
http://thinkdiff.net/facebook/php-sdk-3-0-graph-api-base-facebook-connect-tutorial/
http://careers.stackoverflow.com/jobs/telecommute
http://www.phpeveryday.com/articles/Facebook-Programming-Facebook-API-P850.html
http://programmers.stackexchange.com/questions/64171/which-is-the-best-book-to-learn-facebook-app-development-and-facebook-graph-api
Facebook Programming: Facebook API
Facebook Application Programming Step by step tutorial - part 3. In the previous post, you have tried to create a simple Facebook application. You also use Facebook API. API is a means to communicate between programs. For example, in the previous exercise, you create a program to display a list of friends on Facebook. You can make these programs because of the API. You use Facebook API to display data from Facebook servers.
Currently, the API is the trend in the programming world. Not only are making Facebook API. Google, Amazon, Yahoo, and others also provide an API. With this API, you can create applications by using the features or existing data on their servers.
Calling API
In this post, we will discuss further the API that is on Facebook. We will start from analyzing the program code that we wrote earlier. We'll see, where we use the Facebook API.01 |
|
02 |
03 | // Get these from http://developers.facebook.com |
04 | $api_key = '2c73ae8529134aaaaaaaaaaaaaaaaaaa' ; |
05 | $secret = '3c041a7cbd797aaaaaaaaaaaaaaaaaaa' ; |
06 |
07 | include_once './facebook-platform/php/facebook.php' ; |
08 |
09 | $facebook = new Facebook( $api_key , $secret ); |
10 | $user = $facebook ->require_login(); |
11 |
12 | ?> |
13 |
|
14 | Hello |
15 | Your id : |
16 |
17 | You have several friends: |
18 |
|
19 | $friends = $facebook ->api_client->friends_get(); |
20 | ?> |
21 |
22 |
|
23 |
|
24 | foreach ( $friends as $friend ){ |
25 | echo "
" ; |
26 | } |
27 | ?> |
28 |
|
This is the Object Oriented Programming (OOP). If you do not know about OOP in PHP, I recommend you read this post first. Let more deep understanding of the API. However, if you remain determined to continue to learn Facebook programming is also fine. With a little squeeze your brain, you will come to understand what it is OOP.
Back again to the code above. At the beginning of the line, you are prompted to insert the API Key and secret codes. This kind of entering a username and password database.
1 | $api_key = '2c73ae8529134aaaaaaaaaaaaaaaaaaa' ; |
2 | $secret = '3c041a7cbd7aaaaaaaaaaaaaaaaaaaaa' ; |
1 | include_once './facebook-platform/php/facebook.php' ; |
1 | $facebook = new Facebook( $api_key , $secret ); |
1 | $user = $facebook ->require_login(); |
1 | $friends = $facebook ->api_client->friends_get(); |
1 | foreach ( $friends as $friend ){ |
2 | echo "
" ; |
3 | } |
- Events.get written events_get()
- Friends.get written friends_get()
- Comments.get written comments_get()
Next: Facebook Programming: API Friends

Table of Content
Facebook ProgrammingFirst Application
Facebook Platform
First Facebook App
Facebook API
Facebook API
API Friends
API Events
API Groups
API Page
API Users
Facebook Markup Language
6 Type of FBML
FBML Users and Groups
Content Conditionally
fb:if-can-see
fb:if-can-see-photo
fb:if-is-app-user
fb:if-is-friend-with-viewer
Content in Profile Boxes
fb:if and fb:switch
UI Element and Widget
Using UI Element
Discussion Board
Creating Wall in Application
Building Request and Invitations
No comments:
Post a Comment