ruby on rails - Inviting a friend to your app using Facebook API -




i have web app built rails backend , want users able invite friends use web app.

i've been using koala gem interact graph api.

this code looks like:

@graph = koala::facebook::api.new(fb_token) @graph.get_connections("me", "friends") #returns empty array @graph.get_connections("me", "taggable_friends") #returns array of friend hashes 

here example of 1 of hashes:

{"id"=>"aaipicqkrerndvdbb1e8w1zaonnzhii6yu5n-n8dchlb1ua88udffexf1enhtzjaxan9bnlv3s0ci2da6itdcerqbmyvhkyevlovd8ibxkv8fa",   "name"=>"john smith",   "picture"=>    {"data"=>      {"is_silhouette"=>false,       "url"=>"https://url-for-profile-photo"}}} 

then when attempt do:

@graph.put_connections("aaipicqkrerndvdbb1e8w1zaonnzhii6yu5n-n8dchlb1ua88udffexf1enhtzjaxan9bnlv3s0ci2da6itdcerqbmyvhkyevlovd8ibxkv8fa", "notifications", template: "foo", href: "bar") 

it returns this:

koala::facebook::clienterror: type: oauthexception, code: 803, message: (#803) of aliases requested not exist: aaipicqkrerndvdbb1e8w1zaonnzhii6yu5n-n8dchlb1ua88udffexf1enhtzjaxan9bnlv3s0ci2da6itdcerqbmyvhkyevlovd8ibxkv8fa, x-fb-trace-id: aq9bwxvr2tl [http 404] 

is there way send facebook notifications user join application?

i assuming need send put_connections using uid facebook not seem returning uid me users not registered application.

i see games candy crush, etc, use same method of inviting people game.

any appreciated!

thanks!

after investigation , responses wizkid seems not possible unless have ios/android application or canvas game.

i'm posting answer in future - if other people have same question easier see answer rather trying dig through fb docs!

i update if changes of time posting this, not possible.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -