tags:

views:

101

answers:

1

How to prompt dialog to the user, to publish something on user wall (Facebook) using old rest api for C# and ASP.NET???

Because while using Api.Stream.Publish, it directly publishes on the user's wall without asking to the user.

+1  A: 

First off, check out my new C# sdk here http://faceboosdk.codeplex.com. The samples should help you along your way quite a bit.

In regards to you question, the permission you need to ask for is stream_publish. If you are using my api and want to redirect them with a custom dialong you could get the authentication url like this:

FacebookApp app = new FacebookApp();
dynamic parameters = new ExpandoObject();
parameters.req_perms = "stream_publish";
parameters.next = "http://www.example.com/return";
Uri loginUrl = app.GetLoginUrl(parameters);
Response.Redirect(loginUrl.ToString());

If you want to prompt a dialog on the client side you must use the Facebook Javascript SDK. You can find the code for that here: http://developers.facebook.com/docs/reference/javascript/FB.login

Nathan Totten
I have used the same API's, but you haven't got my question.... Is it possible to prompt dialog box, using the old Rest Api?
Adi_aks
You dont use the rest api for that. If you want to prompt a dialog you have to use the javascript sdk. See the link I have provided. You can call the FB.login method on the client to prompt a login dialog. There are also samples of this in the facebook sdk.
Nathan Totten