Accepting Twitter friendship request using accept.json
Has anyone successfully automated and accepted friendship request on their twitter account 开发者_StackOverflow中文版without the need to click the accept button manually?
I am trying to automatically accept friendship requests for my restricted twitter account. I realize that the Twitter API call to /friendships/accept.json is restricted and I keep getting a 401 unauthorized access error.
I have tried to obtain the post_authenticity_token value using various methods to then used it in the POST parameters sent to the accept.json request as mentioned in the following post: Twitter API: Allow accept request to follow authenticated user
but it keeps failing every time. Any insight or suggestion will be greatly appreciated.
Don't use post_authenticity_token
. You are essentially screen scraping which is fragile, against their TOS, and not working. Instead use the standard OAuth authentication method their API officially supports.
精彩评论