plz help me

This is the place for queries that don't fit in any of the other categories.

plz help me

Postby freezonej » Tue Apr 15, 2014 7:33 am

hi, i want to use tweepy library then....error occurred
plz help me :cry:
Attachments
2.jpg
result
2.jpg (20.61 KiB) Viewed 110 times
1.jpg
source
1.jpg (66.41 KiB) Viewed 110 times
freezonej
 
Posts: 2
Joined: Tue Apr 15, 2014 7:26 am

How to use tweepy?

Postby freezonej » Tue Apr 15, 2014 7:48 am

Hey guys.. i want your help
Code: Select all
import sys
import tweepy
import time
import urllib
hae = "컴퓨터공학과 14학번 주병관입니다"
def send_to_twitter(msg):
    CONSUMER_KEY = ''
    CONSUMER_SECRET = ''
    ACCESS_KEY = ''
    ACCESS_SECRET = ''

    auth = tweepy.OAuthHandler(CONSUMER_KEY,CONSUMER_SECRET)
    auth.set_access_token(ACCESS_KEY,ACCESS_SECRET)
    api = tweepy.API(auth)
    api.update_status(msg)
    return ("",hae)


then, not occurred anything
why?
Last edited by metulburr on Tue Apr 15, 2014 11:21 am, edited 1 time in total.
Reason: removed secret keys
freezonej
 
Posts: 2
Joined: Tue Apr 15, 2014 7:26 am

Re: plz help me

Postby metulburr » Tue Apr 15, 2014 8:50 am

change from
Code: Select all
send_to_twitter(hae())

to
Code: Select all
send_to_twitter(hae)
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1331
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: plz help me

Postby sboden » Tue Apr 15, 2014 9:20 am

And maybe change the "secret" information above... possibly regenerating it ... my 2 cents ;)

Regards,
Sven
sboden
 
Posts: 6
Joined: Mon Apr 14, 2014 8:22 pm

Re: plz help me

Postby mckryall » Wed Apr 16, 2014 2:23 am

This is just a form thing, but use
Code: Select all
if price_n.lower() == "y":

instead of
Code: Select all
if price_n == "Y":

. It takes away case sensitivity.
Python 2.7
Mac Mini
Laptop w/ Ubuntu 14.04
Steam; PSN
mckryall
 
Posts: 94
Joined: Sat Nov 23, 2013 6:13 pm


Return to General Coding Help

Who is online

Users browsing this forum: No registered users and 4 guests