简体   繁体   English

在iPhone上使用OAuth身份验证进行Twitter

[英]using OAuth authentication in iphone for twitter

Hey guys I am trying to implement the twitter for posting the comments about my music application.For that I use OAuth authentication twitter but it give me error please help out I didn't know anything in this. 大家好,我正在尝试实现Twitter来发布有关我的音乐应用程序的评论。为此,我使用OAuth身份验证Twitter,但它给我带来了错误,请帮忙,我对此一无所知。 it show's me this error "'TWITPIC_API_KEY' undeclared (first use in this function)" 它向我显示此错误“未声明'TWITPIC_API_KEY'(此功能中的首次使用)”

if i need some key in this than where to find this key .How to implement this key . 如果我在其中需要一些密钥而不是在哪里找到此密钥。如何实现此密钥。 Guys I realllly didn't know anything .please help me . 伙计们,我真的什么都不知道。请帮助我。

Thanks in advance . 提前致谢 。

You need to create and generate an API key with Twitter and Twitpic for your application. 您需要使用Twitter和Twitpic为您的应用程序创建并生成API密钥。 You can do that at: http://dev.twitter.com/apps (twitter) and http://dev.twitpic.com/apps/new (twitpic) 您可以在以下网址进行操作: http : //dev.twitter.com/apps (twitter)和http://dev.twitpic.com/apps/new(twitpic

Once you've created your application on the twitter and twitpic sites, you'll be provided with the keys you need (referred to as consumer key and consumer secret on twitter iirc). 在twitter和twitpic网站上创建应用程序后,将为您提供所需的密钥(在twitter iirc上称为“消费者密钥”和“消费者秘密”)。

Then, and this is hard to help you with completely as you've not stated which ObjC api you're using or provided code, update or define TWITPIC_API_KEY with your API key. 然后,这很难为您提供完全的帮助,因为您没有说明您使用的是哪个ObjC api或未提供代码,而是使用API​​密钥更新或定义了TWITPIC_API_KEY。

Implementing oAuth or xAuth to post tweets to twitter may be quite tricky. 实现oAuth或xAuth将推文发布到Twitter可能很棘手。 But to help you out with your problem we need more information on the libraries you are using to implement OAuth. 但是为了帮助您解决问题,我们需要有关用于实现OAuth的库的更多信息。

Your "TWITPIC_API_KEY" error looks like you're using a library not quite suitable for your purpose: I assume you don't want to post your comments as pictures to Twitpic ;-) So, if you want to connect your music app with twitter to post tweets there should be no need for a TWITPIC_API_KEY. 您的“ TWITPIC_API_KEY”错误似乎是您使用的图书馆不太适合您的目的:我假设您不想将您的评论作为图片发布到Twitpic ;-)因此,如果您想将音乐应用程序与Twitter连接发布推文,不需要TWITPIC_API_KEY。 You would only need a Twitter-API-Key as dannywartnaby suggested. 您只需要一个dannywartnaby建议的Twitter-API-Key。

Here's a list of OAuth / XAuth / Twitter libraries which you may use for implementing the feature in your application: http://dev.twitter.com/pages/oauth_libraries#objectivec 这是OAuth / XAuth / Twitter库的列表,可用于在应用程序中实现该功能: http : //dev.twitter.com/pages/oauth_libraries#objectivec

MGTwitterEngine is quite popular ... but the choice depends on your functionality & licensing needs. MGTwitterEngine非常受欢迎……但是选择取决于您的功能和许可需求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM