asp.net - Facebook C# SDK - Mobile Web Page : Facebook Wall Post URL Redirect -


i working on mobile web page in asp.net mvc2 allows users post walls. have following code posts user's wall, instead have redirect facebook's mobile "post wall" view allow user add posted message , submit "post" button or "cancel". have recreate view myself? seems lot of sites use.

 public string posttowall(string code)         {             string authtoken = string.empty;             try             {                 authtoken = getauthtoken(code);                 facebookclient app = new facebookclient(authtoken);                 dynamic user = app.get("me");                 var id = user.id;                 var args = new dictionary<string, object>();                 args["message"] = "test wall post";                 args["caption"] = "test caption";                 args["description"] = "test description";                 args["name"] = "test name";                 //args["picture"] = "[your image url]";                 //args["link"] = "[your link url]";                  app.post("/me/feed", args);                 return string.empty;              }             catch (exception ex)             {                 _log.errorformat("error getting facebook authentication token. {0}", ex);                 return string.empty;             }         } 

thanks!

[edit] @offbysome set rough test using facebook javascript sdk , set display: 'touch' still pops in safari iphone user agent. used

attachment: {                 title: '<my title>',                 caption: '<my caption>',                 description: (                         <my description>                     ),                 name: '<name>',                 link:  '<link>',                 display: 'touch', }, 

but none of these attachments added wall posts. doing wrong? dialogs: fb.ui http://developers.facebook.com/docs/reference/javascript/#xfbml

easiest use facebook javascript sdk , use fb.ui dialog allow user share. can set display=touch or display=wap mobile optimized dialog.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -