1. Download and install the Android Studio.
2. Create a new project.
Continue reading Gradle – Run Facebook SDK on Android Studio
1. Download and install the Android Studio.
2. Create a new project.
Continue reading Gradle – Run Facebook SDK on Android Studio
You can get the Facebook Page content by the following URLs:
http://www.facebook.com/feeds/page.php?format=rss20&id=[fb-page-id]
http://www.facebook.com/feeds/page.php?format=atom10&id=[fb-page-id]
Where the [fb-page-id] could be found by browsing your Facebook Page -> Edit Page. That URL should have the following format.
https://www.facebook.com/pages/edit/?id=%5Bfb-page-id%5D&sk=basic
Continue reading Drupal 7 – Get Facebook Page feeds by Aggregator
We can create an <a> anchor hyperlink which will share a specific URL on Facebook.
http://www.facebook.com/sharer/sharer.php?u=<url>
For example, the following URL which share my About page on Facebook.
http://www.facebook.com/sharer/sharer.php?u=https://eureka.ykyuen.info/about
Continue reading Create Facebook Share hyperlink for specific URL
Now we have OAuth 2.0 working with the Facebook Javascript SDK as mentioned in the last article.
Facebook Javascript SDK – A Simple Login Page with OAuth 2.0
The above example is incomplete as there is no logout link. Replace the fb-login-oauth2.php as follow. Continue reading Facebook Javascript SDK – Logout with OAuth 2.0
A few months ago, i published several posts about Facebook Javascript SDK but they no longer work since Facebook updates to OAuth 2.0. So this post is the updated version of
Facebook Javascript SDK – A Simple Login Page
and it should work works with OAuth2. Continue reading Facebook Javascript SDK – A Simple Login Page with OAuth 2.0
If you have the infinite redirect loop problem in Internet Explorer 8. Add the following header in PHP.
<?php header('p3p: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"'); ?>
Done =)
Reference:
After logged in to Facebook, we can post message to the logged in user account with hyperlink. Try the following code. Continue reading Facebook Javascript SDK – Post to Wall
We can find out the Request for permissions URL of a Facebook application as we discussed previously.
Facebook API – Request for permissions URL
So you can force the user to grant the permissions for your Facebook application by checking their login status and redirecting to the above URL if they are unknown user. Continue reading Facebook Javascript SDK – Redirect to request for permissions page if the user is not logged in or not subscribed
The following URL is the request for permissions page of a Facebook application.
The [FB_APP_URL] is the App Namespace which is set in the Facebook application settings.
The [PERMISSIONS] is the comma separated string. (ex. email,read_stream)
Done =)
Reference: Authentication – Facebook Developers
Update 2012-01-14: For OAuth 2.0 implementation, please refer to the new post.
Facebook Javascript SDK – Logout with OAuth 2.0
Update 2011-12-19: Since Facebook has updated their authentication system and HTTP to OAuth 2.0 and HTTPS. The following example will not work any more. i will update the post later. For more information, you can refer to Jerry Cain – Updated JavaScript SDK and OAuth 2.0 Roadmap
Add the following Javascript function for Facebook logout.
function logoutFacebook() { FB.init({ appId:'<?php print YOUR_APP_ID; ?>', cookie:true, status:true, xfbml:true }); FB.logout(function() { // Reload the same page after logout window.location.reload(); // Or uncomment the following line to redirect //window.location = "https://ykyuen.wordpress.com"; }); }