Archive for the FB Connect Category

Increase facebook iframe app’s performance

Posted by mahmud ahsan on June 30, 2010 in FB Connect, Facebook | 6 Comments

facebook This tutorial is for advanced facebook app developer. If you’re beginner than first learn about developing facebook application. Normally if you see iframe base or fbconnect base facebook application development using php sdk you’ll notice some authentication code.

In the example they will run that authentication code each time before page load. But if you look carefully you’ll notice that, the authentication code of php will take extra time to load the iframe base application. Now I’m going to describe how we solved such problem.

Continue

Graph API & IFrame Base Facebook Application Development

Posted by mahmud ahsan on May 28, 2010 in FB Connect, Facebook | 204 Comments

facebookFacebook is one of the top social networking site and its easy to develop facebook application. You can also easily integrate facebook features via facebook connect into your site. But it may happen that you want to develop facebook application that will run within facebook site. If this is the case, then this is the right article for you to start.

In this article I discussed all the basics and techniques you need to develop iframe base facebook application.

You’ll learn from this article:

  1. Setup IFrame Application
  2. Facebook Authentication for Iframe Application
  3. Setting extended permission for more information
  4. How to set links
  5. Form Submission technique and getting Data
  6. JQuery – how to use javascript and javascript library
  7. Graph api using php
  8. Stream Publish (wall post)
  9. Status Update via php api
  10. Status Update via javascript api
  11. Invitation Feature
  12. Iframe Resizing

Before proceeding checkout the demo & Download Code

Demo: http://apps.facebook.com/thinkdiffdemo/
Download Code

Continue

User’s Demographic Data from Facebook

Posted by mahmud ahsan on May 14, 2010 in FB Connect, Facebook, MySQL | 8 Comments

facebookSometimes you may need to collect facebook user’s basic data for your website or application. Then you’ve to call graph api or legacy api or fql query to collect some specific data. This is a basic requirements for most of the fbconnect base website or facebook application.

For this reason, here I’m sharing the code, how could I collect those basic data and store them in database.

Before proceeding check the demo.

If you’re automatically logged in the site, then first logout and relogin and approve all the permissions. Now I’m showing the database table schema first

Continue

Create Facebook PopUp Authentication Window using PHP and javascript

Posted by mahmud ahsan on May 10, 2010 in FB Connect, Facebook, Javascript | 43 Comments

facebookSome days ago one of my friends Paul Espino asked me that he is facing a problem of redirection loop.  He followed exactly my article php sdk & graph api based fb connect tutorial but in his server when user logged in via facebook connect by clicking javascript base fbconnect button the login() method of below code called again and again

FB.Event.subscribe('auth.login', function(response) {
    // do something with response
     login();
});
function login(){
    document.location.href = "<?=$config['baseurl']?>";
}

I tested the code in various server but the problem occurs only in his server. Then I think to solve the problem using php-sdk generated login code.

Continue

PHP SDK & Graph API base Facebook Connect Tutorial

Posted by mahmud ahsan on May 2, 2010 in FB Connect, Facebook | 177 Comments

facebookIn this article I’m focusing facebook latest php sdk to integrate facebook features in your site. Some days ago facebook released their new graph api system and updated their core structure. They also officially released php sdk so that you can easily call facebook latest graph api and old legacy api from server side by php.

Before proceeding first have a look my previous article specially Facebook connect authentication part.

In this post I’ll show

  1. How to check valid session of user, if user successfully logged in
  2. How to call graph api
  3. How to call legacy api
  4. How to update status dynamically using graph api
  5. How to use FQL Query

So take a look my demo of this tutorial. Please login by FBConnect and approve all the permission if you’re first time accessing the page.

Continue

Graph api & javascript base Facebook Connect tutorial

Posted by mahmud ahsan on May 1, 2010 in FB Connect, Facebook | 145 Comments

facebook-social Some days ago facebook released their new graph api system to develop social sites more easily. Its really cool and I personally like the facebook’s new graph api system.  Facebook also updated their old facebook connect system and provided better way to integrate facebook connect feature, user authentication and calling facebook api from website.

In this article, I’ll highlight javascript base

  1. Facebook connect authentication for websites
  2. How to use graph api
  3. How to show stream publish prompt and share prompt
  4. How to run FQL query using javascript
  5. How to set status using old legacy api calling by javascript

Here is the demo  http://thinkdiff.net/demo/newfbconnect1/newconnect.php

fbconnect-demo
Continue

Make your site more social using facebook social plugins

Posted by mahmud ahsan on April 22, 2010 in FB Connect, Facebook, Web | No Comments

facebook-socialJust think 100 facebook users visit your site, among them 50 users like one of the article or product of your site. So 50 users friends will see in their homepage, that their friend liked your article or product. If 50 users have average 100 friends and among them 50 will visit your site then the calculation will be like 50 * 50 * …… = 2500 and more.

So using facebook social plugins you can make your site more social and engaging. Do you know how many users currently using facebook ? Its 400 milion. So why you will not take the power of facebook to promote your site.

Continue

Facebook connect tutorial and api call

Posted by mahmud ahsan on April 8, 2010 in FB Connect | 1 Comment

facebookThis article is now deprecated because facebook changed their connect system. So have a look my updated post http://thinkdiff.net/facebook/graph-api-javascript-base-facebook-connect-tutorial/

There is nothing for me to write about facebook connect tutorial. Because if you visit Facebook_Connect_Tutorial1 You’ll see nicely written tutorial so that you could easily integrate facebook connect for your site. But in this article I will add little information for facebook connect.

I assume that you read the following link and already know implementation of facebook connect. I also assume you know how to setup a facebook canvas application. For learning canvas application setup you should follow this tutorial Creating_a_Platform_Application

Q1. User is connected your site by facebook connect. Now how could I detect user is logged in or not?

Continue

Open Source Facebook, Twitter & Linkedin Status Update Application

Posted by mahmud ahsan on March 24, 2010 in FB Connect, Facebook, Linkedin, Twitter | 49 Comments

facebook-twitter-linkedinAfter getting some of my friends request today I developed this project and released as Open Source GPL License. This is a php, jquery base application.This applications uses the api of facebook, linkedin and twitter to update user’s status on those sites. So you’ll publish one status that will update on 3 sites instantly.

This application will be very helpful to learn fbconnect, facebook extended permission and api to update status, oAuth for twitter and linkedin authentication. And also to learn linkedin api, twitter api usage.

visit http://thinkdiff.net/demo/fblinkedtwit/index.php to see the demo.

On the right side of the demo, you’ll see FBConnect button, Give Twitter Access and Give Linkedin Access Button.

If you want to update status in facebook, after connecting the site using FBConnect you’ve to give special permission by clicking Status Update permission.  Otherwise facebook status will not update.

On the right side write something and click Update Status. If you already give access permission for facebook, linkedin and twitter your user status will update.

facebook-twitter-linkedin status update

Continue

Facebook wall post style

Posted by mahmud ahsan on March 23, 2010 in FB Connect, Facebook | No Comments

facebookStream publish is one of the vital issue in facebook application or facebook connect base application. If you want to publish stream from your facebook application or facebook page application then you have to call

Facebook.streamPublish();

method with some parameters. If you want to publish from facebook connect base application then you have to call

FB.Connect.streamPublish()

with some parameters. One of the important parameter is the second parameter named attachment. Using this parameter you can add video, flash, text etc. This parameter actually is an object that contains text information, caption and other media like flash, music. But in text information that is called description you couldn’t use html. But suppose you have a quiz application and when user will publish stream you want some questions and answers will publish nicely. like this

Continue

Page 1 of 212»