0

I have tried with twitter4j and other libraries. They require a bunch of keys to authenticate.

iOs Example Twitter API application only mode authentication

I am able to share posts following is the code:

String tweetUrl = String.format("https://twitter.com/intent/tweet?text=%s&url=%s",
urlEncode("Tweet text"),
urlEncode("https://www.google.fi/"));
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(tweetUrl));

//Narrow down to official Twitter app, if available:
            List<ResolveInfo> matches = getPackageManager().queryIntentActivities(intent, 0);
            for (ResolveInfo info : matches) {
                if (info.activityInfo.packageName.toLowerCase().startsWith("com.twitter")) {
                    intent.setPackage(info.activityInfo.packageName);
                }
            }

startActivity(intent);

What I want

I want to get list of followers without using libraries and those keys. Is there a way?

Community
  • 1
  • 1
johnrao07
  • 6,690
  • 4
  • 32
  • 55
  • To integrate twitter auth you should use ```Fabric```. If you don't authenticate with Twitter account it's impossible to access anything from the Twitter API. – danypata Jun 22 '16 at 11:24
  • is it application only or does it require some keys and secret keys? – johnrao07 Jun 22 '16 at 11:26
  • It require keys, you have to create a dev account on dev.twitter. Just so you know, iOS has a different support for Twitter & Facebook, provided by the OS itself, but I'm pretty sure you can't access Twitter API without keys & secrets. – danypata Jun 22 '16 at 11:30
  • okay thanks, you saved quite a bit of my time! – johnrao07 Jun 22 '16 at 11:32

0 Answers0