最近在做Facebook Tab & App的开发.
想分享一些基本的文档和概念给大家;
希望可以帮助大家了解Facebook中一些基本的概念, 资源和初步开发入门.
Facebook已经成为一个重要的公司宣传平台,活动和广告平台,还有丰富的应用和游戏.
Facebook Tab & App Development
- What is Tab
- Maximum width is 520px.
- Tab can add to a Page.
- What is Page
- This is a page sample
- How can I create a page for testing?
- Publish status of page
- In the top of page, it is not published if you see following information (you should have admin permission)
-
-
- Only Page admin can assess page if it is not published
-
- What is Facebook App
- For developer, check this out for more information
- Maximum width is 760px
- Pre-condition (Before Development)
- You are developer in Facebook website
- You are administrator of this tab application
- You are admin of page (if you want to add a tab to a page)
- Usually, all Facebook Tab & Page should support both HTTP & HTTPS
- You have your own website to deploy Tab & Page application
- Create a new tab or application
- Open
- Click Create New App in the right side
-
- Following 3 tabs are important (configure Site URL to local path, let we can debug in our local environment)
-
- Site URL is the root path of your website (all rest of URL should start with value of Site URL)
- Rest 4 URLs are entry point of Tab & App
- Facebook will call these entry point via HTTP POST with signed_request information
- Signed_Reuqest include some important information
- Does user like this page or application
- User’s AsseccToken
- Configuration of sandbox
- Settings -> Advanced
- Enable sandbox mode means that only admin can access this Tab & App
FAQ:
- 授权
- OAuth 2.0
- Basic
- Recommend all page in your website include Facebook script and initialization code
- Recommend we have individual page to handle entry point
- Plugins
- Use Fb.Event.subscribe to monitor event (ie: user login)
- Iframe cannot fire event (please use xfbml)
- Use JavaScript to call FB.ui to fire Plugins
- How can we know if user likes our page or not?
- Get information from signed_request
- How can we remove scroll bar in Tab & Page
- Style in body element : overflow:hidden
- Call FB.Canvas.setSize
- How can we grab information from facebook (Graph API & FQL)
- We can get public information from Facebook API
- We have to get AccessToken if we want to access private information
- We can get AccessToken signed_request
- We can get AccessToken from any login page
- from FB.login in javascript
- from login.php
- After we get AccessToken
- If we don’t get enough permission from user, we may not grab information
- Library
- .net
- javascript
- PHP
希望这些Facebook相关资料能帮助你对facebook开发有一个大概的概念,