Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP Twitter API

Status
Not open for further replies.

Olaf Doschke

Programmer
Oct 13, 2004
14,847
1
0
DE
Opinions are differing over Twitter. But no matter if you think it's useless public chattering or are addicted, it's userbase is growing world wide, and it's a new channel available.It's quite easy to use the Twitter API - - you just send http requests and evaluate the responses.

There's still some work to do, for example in regard of OAuth Authentication required by Twitter for new twitter applications. I've done that and more and released it on codeplex: now as release V0.2

For the beginning I concentrated on status methodes, retrieving tweets, sending updates and direct messages. What is yet not supported, can of course still be done via Twitters web interface, but will also be added to the VFP API.

Bye, Olaf.
 
Interesting... I've downloaded the release and am giving it a look through. I'll be back with thoughts and feedback.

PS Can't help wishing you had submitted this for possible inclusion in VFPX out on codeplex.

boyd.gif

SweetPotato Software Website
My Blog
 
Hello Craig,

Well, even though the X in VFPX rather stands for 10, I also think about VFPX as VFP Xtension, a variety of sub projects to extend VFPs capabilities or IDE with features of a more general use.

A Twitter API is not an extension like all the other VFPX projects are. It's very specific and not of general use like PEM Editor, GDI plus, OOP menu etc.

I'm not against the idea of including it into the VFPX range, but I'd say it would not fit well, just because it's the foxpro roof. And that was the though that let me decide to make a seperate project out of it.

Bye, Olaf.

 
Hello Craig,

to bring this back up again on the now joined Forum... If you want this as a VFPX project. Well, it's not indispensable, that this remains a seperate project. Especially if you think about bringing it into your typical workflow of project managemant, testing, naming conventions, etc. I'd be glad to adapt to VFPX, if there are any common conventions.

I still have my reasons to break some of the general rules, eg I did make a break in the naming conventions of Properties, when they are public to the planned COM class.

For example in the VFPTwitterAPI I define a property IsLoggedIn for later OLE COM use, while the internal subobject oAuth is having a property lLoggedIn, like it's foxpro naming convention for a boolean proeprty. The same absence of a type goes for BaseURL, ResponseType etc. properties of that highest level class.

Another Property "IsAbstract" is defined as that name even on the lowest level, as it get's inherited up to the highest level, even though it's meant readonly and just for internal use.

Bye, Olaf.
 
Hi Olaf,

Yes I would like to implent your VFPTwitter as well.
Have a small problem/something I dont understand.

In the readme you advise to <to register your Twitter App.>
Do you want me to build an application from the given VFPTwitterApi.pjx ?
I dont seem to find the place where to obtain the Consumer key and secret AT.

Awaitng your advise,

will twitter you soon!
Jockey2
 
Hi Jockey,

I'll take a look into it today anyway. The Instructions in the readme.txt advise you to get your own consumer key/secret pair and tell how to do this:

cite:
"This version of the VFPTwitterAPI contains OAuth authentication replacing BasicAuth authentication. To use the API you now therefore need a consumer key and consumer secret, which twitter provides.

The consumer key and secret are bound to a Twitter Desktop- or Webapp. Go to to register your Twitter App. The Application Website you're asked for does not yet need to exist.

After you registered an App you'll find your Consumer key and secret at
Edit liboauth.prg and enter your Key and Secret there to test the API with OAuth authentication."

If you have a concrete question about this, I'm glad to answer it.

Regarding your first question: If you want to use the API you want to build a twitter app, don't you? The pjx is just for the ease of taking alook at the API programs, and it's my development environment.

You will need to integrate the prgs into your pjx. The process of doing will surely be made easier in the future. Take a look at the _test.prg which makes the needed calls to initialse the API and then use it, you can learn from this, how to initialise and use the API. But finally you will know better what mechanisms you use in your pjx to integrate prgs into it, perhaps you have another way to SET CLASSLIB and SET PROCEDURE than I do. What is important finally is, that you can do CREATEOBJECT("VFPTwitterAPI") and use that. Like with any set of classes in vcx or prgs you need to integrte this in your process of making them known and usable.

Bye, Olaf.
 
Olaf,

the question is regarding the sentence The consumer key and secret are bound to a Twitter Desktop- or Webapp. Go to to register your Twitter App . The Application Website you're asked for does not yet need to exist.

your Twitter app.?? I dont have a twitter app or do you want me to build an app from your pjx? Otherwise which app are you referring to?

regards,

Jockey2
 
Hi Jockey.

You want to integrate twitter functionality to your app(lication) don't you? Then in regard to twitter.com that pp is a twitter app, even if that functionality is not it's main functionality.

So login to your twitter account, then go to and register your application.

I don't understand what is not understandable by this.

The VFP Twitter API is not an app, it's just an API. It has no consumer key and secret entered into the properties of the OAuth class in liboauth.prg. That's where you will need your key/secret pair for your application. If I would insert my key/secret there, everybody using the VFPTwitterAPI in their application would be seen as one application from twitter. Therefore each user of my API needs it's own registration with twitter.

And again: No, you don't need to compile my pjx, you need to put the prgs from it into your project and integrate them with your classes.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top