titanium - How to post to facebook page feed? -


i using ti studio 3.1.1 ga build native ios app (6.1) integrated facebook. trying post story 1 of fan pages own. story written "recently posted others" section in facebook using facebook page id.

fb.requestwithgraphpath('me/accounts', {}, 'get', function(e) {     if (e.success) {         fb.permissions = ['publish_stream', 'read_stream','manage_pages'];         fb.authorize();          access_tokens = json.parse(e.result);          (var = 0; < fanpages.length; i++) {             ( var j=0; j < access_tokens.data.length; j++) {                 if (fanpages[i].id === access_tokens.data[j].id){                 var data = {                 link: "http://www.example.co/index.html",                 picture: returneddata[0].image,                             };             fb.requestwithgraphpath(fanpages[i].id + '/feed' ,  data,     'post',showrequestresult);                 }             }         }     } });  } 

if instead of 'link' above, if have 'message' in {data} section writes fanpage page id if use 'link' writes in 'recent story others' section... when tested above functionality using tools->graph api explorer http://developers.facebook.com, using page id token story gets posted facebook fanpage page id. not sure how can pass page access token if 'link'. thought above code passing page access token.... has implemented or ideas on how go further? in advance, regards, kp

have tried using feed dialog api call?

http://docs.appcelerator.com/titanium/latest/#!/api/modules.facebook-method-dialog

sample appcelerator documentation

var data = {     link : "http://www.appcelerator.com",     name : "appcelerator titanium mobile",     message : "checkout cool open source project creating mobile apps",     caption : "appcelerator titanium mobile",     picture : "http://developer.appcelerator.com/assets/img/dev_titmobile_image.png",     description : "you've got ideas, you've got power. titanium translates " +                   "your hard won web skills native applications..." }; fb.dialog("feed", data, function(e) {     if(e.success && e.result) {         alert("success! new post id: " + e.result);     } else {         if(e.error) {             alert(e.error);         } else {             alert("user canceled dialog.");         }     } }); 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -