twitter

using since_id and max_id in Twitter API

耗尽温柔 提交于 2021-02-07 08:18:44
问题 I hope I'm overthinking this and there's an obvious solution. From the API (GET statuses/user_timeline) max_id - Returns results with an ID less than (that is, older than) or equal to the specified ID. "or equal to" means it will include the tweet with ID that I sent as my max_id parameter. -- My question is this: if I store the id of my oldest tweet (from a previous request), how can I subtract 1 from this id to exclude it from being returned in my next request? The obvious solution would be

Twitter Sharing in iOS 11

六眼飞鱼酱① 提交于 2021-02-07 04:54:07
问题 I would like to ask for clarification about Twitter sharing in iOS 11 onwards. The official Apple documentation states in the release notes the following: Social accounts have been removed from Settings in iOS 11. Third-party apps no longer have access to those signed-in accounts. (31687059) And the official Twitter documentation here states that: iOS 11 no longer supports using Twitter through the built-in social framework. Instead, you can use Twitter Kit 3 to Tweet, log in users, and use

Twitter Stream API - 401 Unauthorized

自作多情 提交于 2021-02-07 04:20:50
问题 I can't open a connection with Twitter Stream API. The only response I can get, no matter what I try, is 401 Unauthorized . I've made all kinds of tests, even using some libraries I've found on GitHub. Even outside my code, using cURL, I can't make it work. $oauth = array( 'oauth_consumer_key' => $this->m_oauth_consumer_key, 'oauth_nonce' => time(), 'oauth_signature_method' => 'HMAC-SHA1', 'oauth_token' => $this->m_oauth_token, 'oauth_timestamp' => time(), 'oauth_version' => '1.0' ); $base

Tweets over a specific time span (TwitteR)

非 Y 不嫁゛ 提交于 2021-02-05 06:12:26
问题 Is there any way to fetch tweets over a specific time span (say, between December and January) with twitteR rather than simply the past N tweets (as in with tweets <- UserTimeline(user, n = 1000) ? Or is that not possible using the TwitteR library? (meaning that you have to use something like Excel to subset a large number of tweets by date). 回答1: In the package you're using, the searchTwitter function takes the arguments since and until , defined in the documentation as follows: since If not

Twitter premium not authorized

梦想的初衷 提交于 2021-02-05 06:00:11
问题 I attempted to run the code below and am getting an error that states: HTTP Error code: 403: Forbidden: Authentication succeeded but account is not authorized to access this resource. from searchtweets import ResultStream, gen_rule_payload, load_credentials, collect_results import requests premium_search_args = load_credentials("/home/dirname/twitter_keys.yaml", yaml_key="search_tweets_premium", env_overwrite=False) rule = gen_rule_payload("basketball", results_per_call=100) # testing with a

Twitter api upload image always return error “media type unrecognized”

谁都会走 提交于 2021-02-04 08:15:24
问题 I do POST-request on https://upload.twitter.com/1.1/media/upload.json with postfield 'media_data' => base64_encode(file_get_contents($path)) twitter api always return error "media type unrecognized". what's wrong? I tried to change postfield to those versions: 'media_data' => 'data:image/'.$type.';base64,' . base64_encode(file_get_contents($path)), 'media' => file_get_contents($path), 'media' => realpath($path)... file formats: jpeg, jpg 回答1: I'm not sure why media wasn't working for you, but

Bootstrap Drupal

元气小坏坏 提交于 2021-02-02 07:24:32
Sleek, intuitive, and powerful front-end framework for faster and easier web development. http://twitter.github.com/bootstrap/index.html http://drupal.org/project/twitter_bootstrap http://drupal.org/project/twitter_bootstrap_ui http://drupal.org/project/bh_bootstrap http://drupal.org/project/bootstrap 来源: oschina 链接: https://my.oschina.net/u/113490/blog/80118

Google Script (Sheets) + Twitter API Integration - POST direct_messages/events/new (message_create)

浪尽此生 提交于 2021-01-29 19:08:26
问题 I am not a coder but I've managed to successfully use the Google script below to integrate with Twitter API to send tweets, add users to lists and more, from a Google Sheet. I found the script on Google's developer documentation here and with the help of @Diego here I managed to work it out to do all sorts of Twitter POST operations by changing the payload parameters and the url for the call. For some reason I can't understand why, sending DMs keeps on returning ERROR message: Exception:

How to get tweets in real time from a user's timeline using Tweepy

可紊 提交于 2021-01-29 13:18:33
问题 I'm trying to pull tweets from a user's timeline in real-time. I then want to do some analysis on those tweets. Having read the docs it looks like I will need to use tweepy.Stream for this use case. I've done the following: stream.filter(follow='25073877') But Twitter's filter API states the following: Tweets created by the user. Tweets which are retweeted by the user. Replies to any Tweet created by the user. Retweets of any Tweet created by the user. Manual replies, created without pressing

Post photo to Twitter using Curl and Windows command line

限于喜欢 提交于 2021-01-29 12:57:37
问题 I am using Curl to post to the Twitter API via the Windows command line. I've already generated the oAuth headers and can post a tweet without a photo using: curl -k -X POST "https://api.twitter.com/1.1/statuses/update.json" -d "status=Test" -H "Authorization: OAuth oauth_consumer_key=\"xxxxxxxxxxxxxxxxxxx\", oauth_nonce=\"xxxxxxxxxxxxxxxxxxxxxxx\", oauth_signature=\"xxxxxxxxxxxxxxxxxxx\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"xxxxxxxxxx\", oauth_token=\"xxxxxxxxxxxxxxxxx\",