Jump to content


Photo

Chapter 3 Twitter


  • Please log in to reply
3 replies to this topic

#1 Longhair

Longhair

    New Member

  • Members
  • Pip
  • 4 posts

Posted 01 May 2014 - 01:08 AM

I've been stuck on Chapter 3 due to the Twitter changes. After reading some solutions, I decided to try to push through myself.

Twitter requires a mobile phone number to change a setting from read only to read, write and Access direct messages. This is not something that I am willing to do considering the only reason I signed up for twitter in the first place was to follow along with chapter 3.

#2 #TM#

#TM#

    Active Member

  • Members
  • PipPipPip
  • 89 posts
  • Gender:Not Telling

Posted 04 May 2014 - 01:46 AM


@ Longhair,

Thanks for the information.

I am also disappointed about this.

But the big companies keep changing these things for security purposes.

I am sorry to say that you cannot post or write into your time line from now on; without this mobile number business :( :blink:

twitter is not taking even my mobile number. For now, they have neglected Indian telecom providers.

I have tried two of my mobile numbers from two different telecom providers and all they have to say is "yours is not included". SHAME ON YOU TWITTER. <_< :angry:


But you can read from your time line, read your friends timeline, search latest tweets from someone etc. Yes ! you can do that. Below one is an example. Use below codes which will give you list of first ten user name who have posted in your twitter timeline. Check it by going to your twitter account.

At least you will get a feel of twitters apps' working process.

import twitter as t
import urllib.request as ur
import time

CONSUMER_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
CONSUMER_SECRET = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
ACCESS_TOKEN_KEY= 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
ACCESS_TOKEN_SECRET= 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

def tweet():
	authkey = t.Twitter(auth=t.OAuth(ACCESS_TOKEN_KEY, ACCESS_TOKEN_SECRET, CONSUMER_KEY, CONSUMER_SECRET))
	tl = authkey.statuses.home_timeline()
	
	# Get first ten user names who posted in your timeline.
	for i in range(10):
		print (tl[i]['user']['screen_name'])
	
	# Get data from your friends  timeline (here tesla_bot)
	ftl = authkey.statuses.user_timeline(screen_name="tesla_bot")
	print (ftl[1]['user']['description'])
	
	# Search for the latest tweets about followers or following (here @pyconindia)
	tw = authkey.search.tweets(q="@pyconindia")
	print (tw) # It will be printed in a combination of dictionary, lists etc. format. 
	#I kept it like that so that you can learn to parse specific details.
	#Follow the above two examples to find out the way to print a specific thing.

tweet()


Additionally you can follow below link for more detail.

python twitter 1.14.3 package details with examples


#3 gonzo

gonzo

    New Member

  • Members
  • Pip
  • 5 posts

Posted 12 January 2015 - 07:48 PM

I was able to post to my twitter account following the following YouTube video:

#4 #TM#

#TM#

    Active Member

  • Members
  • PipPipPip
  • 89 posts
  • Gender:Not Telling

Posted 16 March 2015 - 07:38 AM

If somebody still having trouble on sending messages to twitter (chapter3 problem) follow my updated blog link.

 

MY UPDATED BLOG LINK

 

Enjoy!!! cool.png smile.png 






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users