apprequests

“All users in param ids must have accepted TOS” Error

柔情痞子 提交于 2020-01-07 02:44:50
问题 I am trying to get my Facebook app to send me a request or notification. When I do this with file_get_contents() as described here, I get a "Failed to open stream" error. The code I'm using is this: //after getting the access token successfully... $apprequest_url ="https://graph.facebook.com/".$user_id."/apprequests?message='Hi'&".$app_access_token.'&method=post'; $result = file_get_contents($apprequest_url); When I try to do the same thing through the SDK, with this code: $result = $facebook

OAuthException: (#2) Failed to create any app request

大兔子大兔子 提交于 2020-01-01 17:56:08
问题 I am using following code to send request from application to user. Everything was fine, but suddenly it stops to work and I get an error: OAuthException: (#2) Failed to create any app request $config = array(); $config['appId'] = $this->app_id; $config['secret'] = $this->app_secret; $facebook = new Facebook($config); $url = "https://graph.facebook.com/oauth/access_token?client_id={$this->app_id}&client_secret={$this->app_secret}&grant_type=client_credentials"; $token = file_get_contents($url

Using Like Button and FB.ui (apprequests) On the Same Page Conflicts

旧时模样 提交于 2019-12-25 03:59:08
问题 I've ran into a problem with a canvas app. If the code for the Like button is enabled, the FB.ui call 'apprequests' gives an error. If I comment out the Like button, its back to normal. Calls with 'stream.publish' work normally tho. My Init code: FB.init({ appId : '12345', status : true, cookie : true, xfbml : true, channelUrl : '/channel.html', oauth : true }); The code for the Like button, generated with the FB tool: <div style="padding-left:177px"> <div id="fb-root"></div> <script>

Frictionless Requests on iOS - how? [duplicate]

你。 提交于 2019-12-24 04:46:09
问题 This question already has answers here : Facebook IOS SDK Frictionless Requests (4 answers) Closed 6 years ago . How do you enable frictionless requests in the Facebook iOS SDK? I saw Ole Begemann's post that it now "just works", but I get the request dialog every time. 回答1: Frictionless requests can be turned on by setting the "frictionless" parameter of the apprequests dialog to "1". For example; // create a dictionary for our dialog's parameters NSMutableDictionary *params =

Failed to create any app request

戏子无情 提交于 2019-12-24 03:39:24
问题 I want to send a request with the facebook app-graph.. sometimes successfully but sometimes failed with return value: { "error": { "message": "(#2) Failed to create any app request", "type": "OAuthException", "code": 2 } } please help me .. why did it happen?hehe 回答1: You need to send the app-to-user request using the application access_token . For example: $param = array( 'message' => 'Check out the latest update', 'data' => 'some_data_string', 'access_token' => 'app_id|app_secret', ); $tmp

Creating facebook apprequests

你离开我真会死。 提交于 2019-12-22 08:14:28
问题 I'm trying to send a message from an app to a user when a specific event happens. Right now I have this code $param = array( 'message' => 'XYZ shared a file with you', 'data' => 'additiona_string_data', 'access_token' => $facebook->getAccessToken(), ); $tmp = $facebook->api("/$uid/apprequests", "POST", $param); but I always get Uncaught OAuthException: (#2) Failed to create any app request thrown I don't know where is the problem. 回答1: You should read the requests documentation. In there is

Facebook IOS SDK Frictionless Requests

时光怂恿深爱的人放手 提交于 2019-12-18 09:49:48
问题 There appears to be no way of setting frictionless requests as on for facebook ios sdk. For Javascript inplementations this can be done in the fb.init method. The only other reference to my problem is Facebook Requests Dialog: Frictionless Requests in native iOS app possible? where it states that frictionless just works when not in sandbox mode. Has anyone else found this to be the case? 回答1: This call enables frictionless requests: [facebook enableFrictionlessRequests]; But it is not enough

Any example of Sending apprequest app-to-user? [closed]

会有一股神秘感。 提交于 2019-12-13 11:28:31
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . How can I send apprequest (app-to-user)? Do I need a special permission for that or just the user id? Any limitation of # of users per request? Anyone got sample code for sale? I have already checked these links: https://developers.facebook.com/docs/requests/ https://developers

Problem with FB.ui apprequest dialog

只谈情不闲聊 提交于 2019-12-12 03:01:38
问题 I am trying to send application invites from an Iframe application. I open the dialog like this. function sendRequestToOneRecipient(user_id) { FB.ui({method: 'apprequests', message: 'message', to: user_id, display: 'popup' }, requestCallback(user_id)); } When the dialog opens I get a ton of "Unsafe JavaScript attempt to access frame with URL from frame with URL" error messages. The send and cancel buttons just make the dialog go blank, but not close and it doesn't work. I don't know if it's

Facebook Android SDK, graph api >3.2 and 4.0 sending app request issue

元气小坏坏 提交于 2019-12-09 23:39:19
问题 I am trying to send app request to my facebook friend after authentication by using the following code snippet. public void sendApplicationRequest(final List<String> userIdList, final String message, final String title, final int requestCode) { final Bundle parameters = new Bundle(); parameters.putString("title", title); parameters.putString("message", message); parameters.putInt("requestCode", requestCode); parameters.putString("frictionless", "1"); String to = getListOfUsersAsString