1

当有人授权我们的应用程序时,他们会填写一份包含一些信息和自定义朋友选择器的表格。表单被提交到服务器,那时我想向选定的朋友发送应用程序邀请,但似乎没有办法不强迫某人使用破坏体验的客户端请求对话框。

我正在尝试这个,但我得到关于目标用户需要接受 TOS 的 OAuthException,然后我才能向他们发送邀请。但是在获得应用程序邀请之前,他们不能接受 TOS!哈哈。

oauth = Koala::Facebook::OAuth.new(ENV["FACEBOOK_APP_ID"], ENV["FACEBOOK_SECRET"])
oauth_token = oauth.get_app_access_token
graph = Koala::Facebook::API.new(oauth_token)
graph.put_object(id_of_friend, "apprequests", {:message=>'user-name wants you to join my app!'})
#=> Koala::Facebook::ClientError: type: OAuthException, code: 200, message: (#200) All users in param ids must have accepted TOS [HTTP 403]

如何生成服务器端应用邀请?

4

1 回答 1

0

onemanarmy,

I think that you need to use a real friend-id instead the string 'friend-id', this is a number of ten digits and it's the id into facebook of the user that you are trying to request.

I know this because I think that I'm in a further step, but still couldn't get it working. I send the request to users but I can't see the request in facebook. Did you get it working? I'm sending the request to user, but I can't see the request in facebook.

Regards, Franco.

于 2013-06-04T12:40:03.190 回答