Reputation: 173
I have developed a Facebook android app(with Facebook SDK for android) which can be installed from Facebook notification links (Application request).Currently the Beta version of the app is published to Play store for testing.
Now when a user receives an app request on the native Facebook app, it will prompt for choosing any browser on that device and the selected browser launch with the Facebook login page.Users will redirected to Play store by only after login to Facebook account to that browser. How we can redirect directly to play store instead of redirecting to browser ?
Upvotes: 3
Views: 1509
Reputation: 867
After spent long time I got the solution is to redirect on Google play Store via facebook app notification with android app and its working 100% with new facebook Interface and facebook SDK version 3.18.
To achieve this you have to follow few steps.
Generate the app request code is.
Bundle params = new Bundle();
params.putString("message",
"Learn how to make your Android apps social");
WebDialog requestsDialog = (new WebDialog.RequestsDialogBuilder(getActivity(),
facebookSession.getFacebookSession(), params))
.setOnCompleteListener(new OnCompleteListener() {
@Override
public void onComplete(Bundle values, FacebookException error) {
if (error != null) {
if (error instanceof FacebookOperationCanceledException) {
Toast.makeText(getActivity(),
"Request cancelled", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(getActivity(),
"Network Error", Toast.LENGTH_SHORT).show();
}
} else {
final String requestId = values.getString("request");
if (requestId != null) {
Toast.makeText(getActivity(), "Request sent",
Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(getActivity(),
"Request cancelled", Toast.LENGTH_SHORT).show();
}
}
}
}).build();
requestsDialog.show();
Go to in developers.facebook.com in ur app account and then there "app details->Contact Info->Marketing URL->PASTE YOUR APPLICATION PATH OF PLAY STORE". and save it. After few hours it will work fine and you will get ur target :)
Upvotes: 1
Reputation: 593
You should set a market://details?id=YOUR_APP_ID
like URL for redirection URL. Then it will be redirected to the play store if the login succeeded.
Upvotes: 0