Skip to main content

Tedshd's Dev note

Category: Facebook

JavaScript - facebook save to facebook button

# JavaScript - facebook save to facebook button 2016 F8 Facebook release new function - save to facebook Then we can use it now ## Step 1 Go to facebook developer Save Button - Social Plugins - Documentation - Facebook for Developers ## Step 2 Build or use facebook application If you had facebook application can skip this step If you build facebook application and you can get this code ...

JavaScript - custom facebook share button

# JavaScript - custom facebook share button Before use facebook API, must create facebook app on facebook's [developer website](https://developers.facebook.com/) to get a app id Facebook support share API to people and it is easy to use. But sometimes we need customize share button style in our web. We can use 2 way. # 1. Link share api link Simple way ## HTML <a href="http://www.facebook.com/share.php" class="custom">Share</a> and then you can use CSS custom a style. ...

Facebook api get UID & AccessToken

# Facebook api get UID & AccessToken Build App in facebook APP_ID is a facebook App id Must set facebook App’s web url and use code in it’s domain <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>fb_oauth</title> <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> </head> <body> <div id="fb-root"></div> <p> <input id="FBLogin" type="button" value="登入臉書" /> </p> <p> <span id="uid"></span> <br> <span id="accessToken"></span> </p> </body> <script src="http://connect.facebook.net/zh_TW/all.js"></script> <script> FB.init({ appId: 'APP_ID', status: true, cookie: true, xfbml: true, oauth: true }); $('#FBLogin'). ...