criso / fbgraph

NodeJs module to access the facebook graph api
http://criso.github.io/fbgraph/
1.09k stars 176 forks source link

Question about Custom Actions #13

Closed thisissami closed 11 years ago

thisissami commented 12 years ago

Hi There,

I have a question about using custom facebook actions with this API. I'm trying to post an action as per the "Open Graph Mechanics" section of this page: https://developers.facebook.com/docs/opengraph/keyconcepts/.

Essentially, I want to make a call as follows: POST https://graph.facebook.com/me/appname:actiontype?objecttype=Object_URL&accessToken=accesstoken

If I make a call as follows:

            graph.setAccessToken(user.accessToken)
                .post("/me/appname:actiontype", {objecttype:Object_URL}, function(err,data){
                    if(err) console.log(err)
                    else console.log(data)
                });

will both the objectURL/type and accessToken make it through to facebook? I've been looking through the code you've written and I can't tell what exactly will happen.

could i just remove the "setAccessToken()" clause and add the accessToken info into the "postData" parameter object, or would that break something in your code?

I'm currently developing on a local computer - otherwise I would test this myself.

Best, Sami

criso commented 11 years ago

Sorry for taking so long. "will both the objectURL/type and accessToken make it through to facebook?" Yes.