How to Develop & Test Facebook Connect Application Locally

facebookMost of the time people write code locally, upload them in remote server and test whether his facebook connect base application works or not. They either has a domain name or a dedicated IP address. Because when we create a facebook application we have to provide an URL in the setting page. In this tutorial I’ll show you how to develop and test facebook connect base application locally. This tutorial will only work for facebook connect base application or website, not for facebook Iframe base canvas or page application.

Case:

  1. We want to develop a facebook connect base website/application
  2. We want to test everything in our laptop or local pc not on the remote server
  3. Suppose we don’t have a dedicated IP address or any domain

Continue Reading →

Comments { 30 }

200+ ACM Problems solution source code

ACMDuring 2003~2007 I was an undergraduate computer science student. In this time for our course material and for programming passion I used to try to solve ACM problems from the well-known University of Valladolid site. I solved arround 203 ACM problems in this site. Today I found in my laptop still the accepted codes are saved. So I think I should share these code. May be these could be useful for someone. I had written 99% of my code using C++ language.

Continue Reading →

Comments { 4 }

Facebook Open Graph Meta WordPress Plugin

Have you ever noticed that, if you implemented Facebook like or Facebook Share in wordpress blog and when people click Like the shared post on user wall looks not good most of the time. This is because you didn’t implement the facebook open graph meta data in your blog post or page. As a result when facebook parse the link sometimes they can’t parse it properly that you expected.

To solve the situation you’ve to add open graph meta data in your site. Some days ago I manually added this in my blog’s theme, but later I decided to make a wordpress plugin so that it become easier to use and share with others.

Continue Reading →

Comments { 35 }

Replacing CodeIgniter’s session by PHP’s Native Session

codeigniterFor last 8 months, I have been working on a web application. We are developing the application based on CodeIgniter framework. In our project there are normal web version and mobile view version. Some days ago we noticed that, some people can’t login their account via mobile version though there username & password are correct. After debugging and digging the problem we found that in iPod Touch 2G/3GS Safari browser, this problem is happening.

Continue Reading →

Comments { 8 }

New JavaScript SDK & OAuth 2.0 based FBConnect Tutorial

facebookToday Facebook released their updated JavaScript SDK. Now the authentication system is based on OAuth 2.0 and HTTPS. So I updated my previous tutorial by writing this new post. In this post I’ll show you using javascript how could you easily integrate facebook connect (login/logout) features in your site. Additionally how to use Facebook API to get user’s information. Here I only used JavaScript no back-end PHP or any server side language.

In this tutorial I’ll explain:

  1. Facebook Authentication Process
  2. Facebook new JavaScript Usage
  3. Facebook Connect Authentication
  4. How to get extended permission to get more informations
  5. How to use graph api
  6. How to show stream publish prompt and share prompt
  7. How to publish post in user’s wall using graph api
  8. How to get additional information by FQL Query
  9. How to set status using old legacy api (REST api) calling
  10. How to show ajax loader when interactive with facebook

Continue Reading →

Comments { 196 }

Beginning of my career

After long days I’m writing this post. Though my blog is very popular for facebook related tutorials, but this is not anything related to facebook or php. This is about me and beginning of my career.

I think every programmer should learn different languages and work in different platforms. You can ask me why? If you work on PHP backend development for 5 years, you will become an experienced guy and will earn better income.

So why you’ll invest your time for other language and other platform?
Because it will give you a good taste of programming and you’ll enjoy yourself. I’m not telling you to leave PHP development and move to other platform, I’m just telling you to make some extra time from your regular job and work in different platform or technology.

Continue Reading →

Comments { 43 }

PHP SDK 3.0 & Graph API base Facebook Connect Tutorial

facebookFacebook recently updated their PHP-SDK to version 3.0 also added new way of authentication. This is a major change. So this is the updated post of my old popular post.

In this version of my code, I avoided javascript authentication, because that is cookie based and php sdk 3.0 has some conflicts with the old system. Facebook will also update the javascript sdk soon, so later you can use the login/logout system of javascript api with php sdk. But for now you should use fully php base authentication.

In this post you’ll learn:

  1. How to integrate Facebook Connect in your website
  2. How to generate Facebook Login / Logout URL
  3. How to get extended permissions from users
  4. How to call graph api
  5. How to run FQL Query
  6. Publish Wall Post using PHP
  7. Publish Wall Post using Facebook Javascript API
  8. Invite friends using Facebook Javascript API
  9. No Facebook Javascript only use PHP SDK

Continue Reading →

Comments { 263 }

Graph API & IFrame Base Facebook Application Development PHP SDK 3.0

facebookFacebook recently updated their PHP-SDK to version 3.0. This is a major change. So I decided to update some of my facebook related tutorials with updated code.

At first I want to tell you that, this post is the updated version of my popular post Graph API & IFrame Base Facebook Application Development . So if you never saw that tutorial I request you to visit that and learn the basic things specially facebook application setup. Also on that post I mentioned some important things regarding iframe, so in this post I’ll not mention them again.

So in this updated post we will learn:

  1. How to update facebook php sdk 3.0 library
  2. Authentication
  3. How to give extended permissions
  4. How to call graph api
  5. How to publish stream using facebook’s latest dialog system
  6. How to request/invite your friends and track them

Continue Reading →

Comments { 237 }

Facebook App’s Infinite Redirection Solution

facebook Yesterday someone mailed me that my application http://apps.facebook.com/thinkdiffdemo is continuously refreshing. I developed that application 1 year ago for demo purpose. So today I checked and I found yeah its refreshing continuously.

Then I changed the application setting like below and thus the problem solved. So if you also faced this type of problem first check the application setting.

Continue Reading →

Comments { 54 }

Cron – automated task using php

cron automated task phpFor last few weeks I have been working in a web application, where I’ve to do some automated tasks. This is the first time I learned cron process, wrote php script for the cron process and some basic shell script that runs the php script. So here I’m describing the things I learned.

Summary of the tasks:

  1. Write a php script
  2. Test the script
  3. Confirm only one process of the php script is running
  4. Set the cron so that the php script will run in every 2 minute

Continue Reading →

Comments { 6 }