tags:

views:

1029

answers:

2

Hi I want to publsh a post on user's wall but am getting this "permission error" error code 200 when trying to use stream.publish method of facebook api...i hve requested for extended permissions as:

http://m.facebook.com/login.php?api%5Fkey="+API_KEY&....&req_perms=read_stream,publish_stream,offline_access

but when i make call to the method stream.publish i am getting this permission error..it seems that req_perms in above url is simply getting ignored.. i am passing "method(stream.publish)","api_key","message","session_key","v","sig" as parametres to url http://api.facebook.com/restserver.php?

will be greatful if anyone helps meout in this problem or provide me with proper steps for publishing a post on user's wall...the application is being developed on blackbery platform..

+1  A: 

Can you check to see if you are getting a valid session from facebook before trying stream.publish? If you are getting the offline_access extended permission, you will have a session object that has expires=0.

You can also try called the users.hasAppPermission API methods to verify you got the permissions.

Are you just making POSTs directly to http://api.facebook.com/restserver.php ? Are you including the request data in the POST body? You also should include a Content-Type: header of application/x-www-form-urlencoded in your headers.

I think it can be tricky to make direct calls to the restserver.php. Is there a client library you can use, like the Javascript client library?

Pat James
+1  A: 

I don't think you can request permissions from login.php. Instead check out prompt_permissions.php

http://wiki.developers.facebook.com/index.php/Authorization_and_Authentication_for_Desktop_Applications

Richard