My website is allow user to tweet something to their timeline in twitter. When they click on tweet button, twitter box platform will popup and user can write or edit something before tweet; but I don't want this way, I want is when they click on tweet button it will tweet to their timeline automatically (no need to call twitter box platform). Is it possible?
My website is allow user to tweet something to their timeline in twitter. When they click on tweet button, twitter box platform will popup and user can write or edit something before tweet; but I don't want this way, I want is when they click on tweet button it will tweet to their timeline automatically (no need to call twitter box platform). Is it possible?
Share Improve this question edited Mar 26, 2016 at 14:23 Brian Tompsett - 汤莱恩 5,89372 gold badges61 silver badges133 bronze badges asked Mar 24, 2016 at 12:59 hamedhamed 611 silver badge4 bronze badges3 Answers
Reset to default 3Here is the twitter's documentation : https://dev.twitter./web/javascript
Short answer: no
When using the Twitter API, anything that you want to do that involves a user's account (post tweets, retweet, favorite, etc. ) will require permission from the user. This permission is given in the form of a user's unique access key and secret.
In order to obtain a user's key & secret you will need to authenticate the user using a Twitter sign in. This process will take the user to Twitter's sign in page. Once they have successfully signed in they will be redirected back to your app.
For further reading, please see: https://developer.twitter./en/docs/accounts-and-users/subscribe-account-activity/guides/authenticating-users
const windowReference=window.location.href;
const hrefEl="https://twitter./intent/tweet?url=" + windowReference + "&text=" + encodeURIComponent(textToTweet);
tweetButton.setAttribute('href',hrefEl)
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744249918a4565119.html
评论列表(0条)