Random Blog
Join JournalHome.com.
Create your own free blog today.
Create Your Blog
Flag this entry/bog.
It will be manually reviewed.
Report This!

Journal Home Official Blog

How to test/debug your Facebook App

Posted in HTML Code

Over the past few weeks/month I have been adding various third party plugins to allow users to connect to Journalhome using their favourite social network account, (to date I have added Facebook, Twitter and Linkedin).

But one of the problems I have been facing is, how to debug/test my Facebook app. When you create an app, (on your facebook developer account), it is expected to redirect to your live server. The obvious solution is to create a new 'test' account.

So lets say your test account is http://127.0.0.1/, (or whatever IP address/website you use), create a new app in facebook using that address. Make sure that all the values are as close as possible to your 'live' server.

I have been having some issues with htpp://localhost/, I think this is because facebook tries to parse the URL and it doesn't like it, so it might be better to use the ip address.
It did work some times, but not always, but when you debugging you don't want to have it nor work 'sometimes'.

Pay special attention to the 'Web Site' section, make sure that the site URL points to your test website, (even if it is local and only accessible to you). Facebook uses this address to allow only applications from that address to make 'calls'.

Facebook app

Note your new Application ID and Application secret, they are obviously not the same as your live application details.

And that's all you need to do with Facebook really, (You can also use port number like http://www.example.com:6141/) if you need to.

You now need to create some test accounts, to do that, download the facebook test user manager, it will allow you to create test accounts, (and delete them/edit them/add friends). Just copy the files somewhere on your test server and run it from there, (like http://127.0.0.1/testuser/).

That's all you need really, just make sure that your test server is pointing to the 'test' version of your application and Facebook will return you back to your test server.

NB: This might be stating the obvious, but make sure that you replace the App ID and App secret when you nove to the live server. In my case I have config files that are 'live' and 'test' to ensure that I don't need to bother about changing the app ID and secret.

That's it, let me know if you have an easier way of testing Facebook apps. I am also very interested to know if there are other tools to help you test your Facebook app.

Share |

05h23 - 8/6/2011 - post comment


Notify me of followup comments via e-mail.

Share and enjoy
  • Digg
  • del.icio.us
  • DZone
  • Netvouz
  • NewsVine
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • YahooMyWeb
Last Page Next Page
Description

JournalHome.com has created this blog for the purpose of keeping members and visitors up to date with JournalHome.com site information.
The easiest way to stay up to date is by using the RSS/XML feed.
Place this URL within your rss aggregator and it will automatically update itself whenever a new journal entry is published.


«  May 2012  »
MonTueWedThuFriSatSun
 123456
78910111213
14151617181920
21222324252627
28293031 

Home
User Profile
Archives
Friends
My Wall
Links
Webmaster Forum
Free Blog
Follow JournalHome on Twitter







Recent Entries
- How to moderate thousands of posts in vBulletin 3.x without timeout
- Happy new year!
- Stand up against the Internet blacklist legislation
- Very high server load
- Started facebook promotion - Part 2
Entry Categories
- Contest
- HTML Code
- News
- Web Security
- Politics
- PHP Code
- Changelog