twitter

tweepy Not Authorized - tweepy.error.TweepError: Not authorized

六月ゝ 毕业季﹏ 提交于 2020-01-03 10:54:51
问题 I get the following error when I try to use tweepy for twitter authentication. File "/usr/local/lib/python2.7/dist-packages/tweepy/models.py", line 146, in followers return self._api.followers(user_id=self.id, **kargs) File "/usr/local/lib/python2.7/dist-packages/tweepy/binder.py", line 197, in _call return method.execute() File "/usr/local/lib/python2.7/dist-packages/tweepy/binder.py", line 173, in execute raise TweepError(error_msg, resp) tweepy.error.TweepError: Not authorized. I am not

OAuth - Consumer secret in open-source applications

故事扮演 提交于 2020-01-03 08:35:31
问题 I'm creating a Wordpress plugin for collectively managing a Twitter account. I want to allow the user to add accounts via the Admin panel similar to the way twitterfeed.com does. However, the only way I can see of doing it is to get the user to sign in to their account, register the application under a unique name and paste in the Consumer Key and Consumer Secret to my application. What are the security repercussions of simply distributing a single Consumer Key and Consumer Secret with my

OAuth - Consumer secret in open-source applications

瘦欲@ 提交于 2020-01-03 08:35:10
问题 I'm creating a Wordpress plugin for collectively managing a Twitter account. I want to allow the user to add accounts via the Admin panel similar to the way twitterfeed.com does. However, the only way I can see of doing it is to get the user to sign in to their account, register the application under a unique name and paste in the Consumer Key and Consumer Secret to my application. What are the security repercussions of simply distributing a single Consumer Key and Consumer Secret with my

Can't send tweet anymore: plugin com.apple.share.Twitter.post invalidated

[亡魂溺海] 提交于 2020-01-03 07:58:09
问题 My app uses an SLComposeViewController to post to Twitter. This worked for a few months and then suddenly stopped about a week ago. The Twitter share view allows me to press "Post," and the following code still gets to the "..." line: twitterComposeViewController.completionHandler = ^(SLComposeViewControllerResult result){ if (result == SLComposeViewControllerResultDone){ ... } }; and dismisses the Twitter share view, but the tweet fails. I get a alert view that says, Cannot Send Tweet The

How to implement application-only authentication for twitter in Grails using scribe?

北战南征 提交于 2020-01-03 05:37:06
问题 Earlier i was using GET search/tweets of Twitter API 1.0 To get tweets according to #tags in Grails Map jsonMap = grails.converters.JSON.parse(new URL('http://search.twitter.com/search.json?q=%23' + URLEncoder.encode(tag) + '&offset=' + offset + 'result_type=mixed&lang=en&page=' + page).text) But due to change in Twitter API version 1.1 now the above call requires Authentication. I want to fetch tweets on behalf of Application(Authentication) not by user Authentication. Is this possible? I

R tweets with emojis

。_饼干妹妹 提交于 2020-01-03 05:08:25
问题 I scrapped tweets from the twitter API and the package rtweet but I don't know how to work with text with emojis because they are in the form '\U0001f600' and all the regex code that I tried failed until now. I can't get anything of it. For example text = 'text text. \U0001f600' grepl('U',text) Give me FALSE grepl('000',text) Also give me FALSE. Another problem is that they are often sticked to the word before (for example i am here\U0001f600 ) So how can I make R recognize emojis of that

How to have gsub handle multiple patterns and replacements

為{幸葍}努か 提交于 2020-01-03 04:58:10
问题 A while ago I created a function in PHP to "twitterize" the text of tweets pulled via Twitter's API. Here's what it looked like: function twitterize($tweet){ $patterns = array ( "/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)/", "/(?<=^|(?<=[^a-zA-Z0-9-\.]))@([A-Za-z_]+[A-Za-z0-9_]+)/", "/(?<=^|(?<=[^a-zA-Z0-9-\.]))#([A-Za-z_]+[A-Za-z0-9_]+)/"); $replacements = array ("<a href='

Twitter API always saying 400 Bad Request

送分小仙女□ 提交于 2020-01-03 04:48:12
问题 I am using the following code to retrieve an amount of Tweets from the Twitter API: $cache_file = "cache/$username-twitter.cache"; $last = filemtime($cache_file); $now = time(); $interval = $interval * 60; // ten minutes // Check the cache file age if ( !$last || (( $now - $last ) > $interval) ) { // cache file doesn't exist, or is old, so refresh it // Get the data from Twitter JSON API //$json = @file_get_contents("http://api.twitter.com/1/statuses/user_timeline.json?screen_name=" .

Add fields to Logstash Twitter input and Elasticsearch output

丶灬走出姿态 提交于 2020-01-03 04:47:32
问题 I am using logstash to save the twitter stream to elasticsearch. Before saving, I want to Add a new field which indicates whether the tweet is a RT or reply or organic Use the tweet id as elasticsearch's document id But I've been unable to do either! Logstash config file: input { twitter { oauth_token => "" oauth_token_secret => "" consumer_key => "" consumer_secret => "" full_tweet => true keywords => ["test"] } } filter { ruby { code => " if !event['retweeted_status'].nil? event['tweet_type

Getting Bad Authentication Data error from Twitter API

北城以北 提交于 2020-01-03 04:00:27
问题 Ok, so I have been using the Abraham William Twitter API library on Github to try pulling my followers on Twitter on my website , but I am getting a bad authentication error "Bad Authentication data [code] => 215" even though I followed the steps . Below is the code that authenticates me and supposed to help me try the different methods to request data from Twitter .. Could someone please tell me why I am getting this error , I would greatly appreciate it .. Abraham's twitter library