I’m trying to create a follow button through the REST API but I always get a 215 error.
I’m using Scott Desapio’s classic ASP oauth library:
Const TWITTER_OAUTH_URL_ACCESS = "https://api.twitter.com/oauth/access_token"
Const TWITTER_OAUTH_URL_AUTHENTICATE = "https://api.twitter.com/oauth/authenticate"
Const TWITTER_OAUTH_URL_REQUEST_TOKEN = "https://api.twitter.com/oauth/request_token"
Const TWITTER_OAUTH_URL_UPDATE_STATUS = "https://api.twitter.com/1.1/statuses/update.json"
Const TWITTER_OAUTH_URL_FRIENDSHIP_CREATE = "https://api.twitter.com/1.1/friendships/create.json"
Const TWITTER_OAUTH_URL_FRIENDSHIP_LOOKUP = "https://api.twitter.com/1.1/friendships/lookup.json"
Const TWITTER_SCREEN_NAME = "screen_name"
Const TWITTER_SITE_SCREEN_NAME = "" 'screen name to follow'
objOAuth.ConsumerKey = OAUTH_EXAMPLE_CONSUMER_KEY
objOAuth.ConsumerSecret = OAUTH_EXAMPLE_CONSUMER_SECRET
objOAuth.EndPoint = TWITTER_OAUTH_URL_FRIENDSHIP_CREATE
objOAuth.Parameters.Add "screen_name", TWITTER_SITE_SCREEN_NAME
objOAuth.RequestMethod = OAUTH_REQUEST_METHOD_POST
objOAuth.Send()
I can create statuses no problem but when I try to follow I always get
{"errors":[{"message":"Bad Authentication data","code":215}]}
Also if i switch it back to API v1 it says:
{"request":"\/1\/friendships\/create.json?oauth_consumer_key=<key_here>&oauth_nonce=1431885555&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1352930155&oauth_version=1.0&screen_name=<account_here>&oauth_signature=<signature_here>","error":"Could not authenticate you."}
I have tried searching google endlessly and I have not found anything that seems to help. Thanks in advance!
Edit:
Seems to be doing it for everything in /friendships