facebook_logo

As you all know recent changes in privacy issues made Facebook to change their basic API and added some security concerns. From my best practise, most of the old applications are safe, but you will be in trouble when you create new application. By default you cannot access user’s photos, profile pictures , albums etc. If you continue with old REST API, you may face this problem. You will get an empty array or json string when you call photos.getAlbums function.

If you test these functions from Facebook Console Tool:

http://developers.facebook.com/docs/reference/rest/photos.getAlbums

It returns real value when you select old applications and returns empty string [] if you select your newly created Facebook app.

To get all those support, you need to use new Graph API

But if you follow the same steps mentioned in that official document, you will still get this empty string problem. Because, in the basic authentication call, there is no permission type is mentioned. You can only see a basic message with Allow or Deny button.

According to that document, as the part of authentication, you need to call this url with your client id and redirect url and it returns an access_token after a #

https://graph.facebook.com/oauth/authorize?
    client_id=...&
    redirect_uri=http://www.example.com/oauth_redirect

You need to use this access_token to request all other functions, eg:

https://graph.facebook.com/me?access_token=...

This call will work for most of the requests except photos or albums. So the mistake in these calls are the permission.

Here is the correction:

https://graph.facebook.com/oauth/authorize?
    client_id=...&
    redirect_uri=http://www.example.com/oauth_redirect&perms=publish_stream,user_photos

Here we pass perms parameter to set different permission and if you use the access_token after this request , you can access user photos and albums. You can see another permission popup with album and photo access.

Here is the list of such extended permissions in Facebook.

This is the problem when you use new Javascript SDK for graph API, or when you try to integrate these API in PHP or PERL or any other Server side scripting language from the scratch.

If you use new Facebook PHP Graph SDK , you cannot get these problems, but there is still another hidden problem if you continue testing code by the example provided by them.

It is my next POST . See you at there

Thanks

Sajith

Tags: , , , , , , , , , , , , , , , , , , , ,

· · · ◊ ◊ ◊ · · ·

Recently some quotes struck my mind from a forwared email. It is basically , i think, 100% true , even though described in as a  funny way.

See:

  1. Project Manager is a Person who thinks nine Women can deliver a baby
    in One month
  2. Developer is a Person who thinks it will take 18 months to deliver a Baby.
  3. Onsite Coordinator is one who thinks single Woman can deliver nine
    babies in one month
  4. Client is the one who doesn`t know why he wants a baby
  5. Marketing Manager is a person who thinks he can deliver a baby even
    if no man and woman are available
  6. Resource Optimization Team thinks they don`t Need a man or
    woman;They`ll produce a child with zero resources
  7. Documentation Team thinks they don`t care whether the child is
    delivered, they`ll just document 9 months.
  8. Quality Auditor is the person who is never happy with the PROCESS to
    produce a baby.And lastly……
  9. Tester is a person who always tells his wife that this is not the Right baby

Courtesy: Some Forwared Email

Tags: , , , , , , , , , ,

· · · ◊ ◊ ◊ · · ·

وظائف 2011 تحويل العملات برامج برنامج تسريع التحميل برنامج الفلاش برنامج محول الصوتيات عربي hotel 2011 زيادة رواتب العساكر 1431