Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Posting as Fan Page with the Facebook Module (HTTP request works, requestWithGraphPath does not)

$
0
0

Ok, I've tried every post I could find on the internet about posting AS a fan page to Facebook and I just cannot get this to work. It always comes up as my profile (like someone came to my page and posted, it's not the PAGE posting the post).

Here is my call:

pid is page id acc is the PAGES access token

I've tried it with and without the '?access_token='+acc - same result.

fb.requestWithGraphPath(pid+'/photos'+'?access_token='+acc,{picture:image,access_token: acc,page_id: pid,message:data},'POST',showRequestResult);
Now, how I CAN get it to work is if I do this (cut out some code, I'm just saying an HTTP POST request:
xhr.open("POST", 'https://graph.facebook.com/v2.1/'+pid+'/feed?access_token='+acc+ '&message=' + data);
That works just fine, BUT I cannot figure out how to post images like that. I could set it up to upload the image to our servers, then pass the URL, but I'd much rather get the module to work.

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>