Follow web intent inside android app not working

android
webintent

#1

I want my users to follow my app inside my android app…So when the user clicks on a button the intent is fired:

As per the documentation here is my code:
String urlTweeter = “https://twitter.com/intent/follow/user_id=myuserId”;
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(urlTweeter));
startActivity(intent);

However, when my browser opens, I get the message: “Sorry, this page does not exist !”…
Instead of using the user_id as parameter I tried screen_name and got the same results…
Is there any workaround for this or am I doing something wrong ?


#2

It looks like you’re not adding the ID parameter correctly - you should have ?user_id= rather than /user_id.

For example, this should work https://twitter.com/intent/follow?user_id=786491

I’m not certain how this is expected to work within an Android app intent, however.


#3

As a matter I did made the mistake of writing /user_id instead of ?user_id
It does work with the android app intent…The web browser opens prompting the user to login to follow the page


#4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.