Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook - Frictionless requests on android

Is there a way to tell the facebook android SDK to send frictionless requests on a user->user app request ?

I've integrated an app on android by following the tutorial on the facebook website. There is some documentation on how to send facebook user->user requests using mFacebook.dialog(context, "apprequests", params, new AppRequestsListener()); , but there is no mention of how to make these requests frictionless. On the web the frictionlessRequests:true option seems to do the trick. I tried setting this as a parameter on the call to mFacebook.dialog() (using the params reference), but that did not help. The facebook requests dialog documentation page claims that this feature is available on android. There is no mention anywhere on how to enable it.

Frictionless Requests are supported with the Javascript SDK on Desktop Canvas and mobile web as well as with the iOS and android SDKs on native mobile apps.

Is there an equivalent call that can be used for android so the user gets to see the 'Don't ask again' (see pic below) option on the request dialog ? Right now the requests dialog is shown every time even if a request was sent previously.

Frictionless requests

like image 549
Deepak Bala Avatar asked Dec 21 '22 12:12

Deepak Bala


1 Answers

I've struggled with the same thing today. I finally found a way that works for me. I'm using the sdk 3.0.2b, I followed the guide here https://developers.facebook.com/docs/howtos/androidsdk/3.0/send-requests/

In step 2 the guide suggests the code:

private void sendRequestDialog() {
   Bundle params = new Bundle();
   params.putString("message", "Learn how to make your Android apps social");
   WebDialog requestsDialog = (
   ...

After a lot of trial and error adding param frictionless=1 worked for me:

private void sendRequestDialog() {
   Bundle params = new Bundle();
   params.putString("message", "Learn how to make your Android apps social");

   params.putString("frictionless", "1"); //Turn on frictionless

   WebDialog requestsDialog = (
   ...
like image 97
Daniel Backman Avatar answered Jan 03 '23 02:01

Daniel Backman