Now that MGTwitterEngine is officially on Github, I've started adding support for some functionality on my branch with the intention that it could be merged with the official branch.

Build Dependancies

Out the box to build MGTwitterEngine you need to have yajl & oauthconsumer installed. The folder TouchJSON will be Red if the source isn't in the project directory.

yajl

yajl must be built in a directory path that does not include spaces otherwise it fails.

Building is easy, grab CMake from http://cmake.org install it and then in the yajl source dir do: ./configure && sudo make install

This will put compile the lib and install it into /usr/local/lib & the headers in /usr/local/include.

The reason this is done is that, at present, the MGTwitterEngine project refers to the headers <yajl/yajl*>

Edit the project preferences and point them to the header, specifically set “User Header Search Paths” to /usr/local/include and check Recursive.

TouchJSON

Can be found in two places, not sure which is the official repository but I downloaded the GoogleCode version

http://code.google.com/p/touchcode/
http://github.com/mrevilme/TouchJSON

oauthconsumer

There are three projects (1 original, 2 forks) on Github. I don't know which is the best to use.

At present the http://github.com/jdg/oauthconsumer & http://github.com/ctshryock/oauthconsumer no longer include the OAToken_KeychainExtensions.h/m files (as not needed for the iPhone) which are listed in the Xcode project. If you use either of those them simply those files from the project.

Then there is http://github.com/amazingsyco/oauthconsumer fork which does have the KeychainExtensions.

Adding SocialGraph calls

At present there are two social graph calls which return a list of ids.

The returns for each API request have the same structure. Here is an example with curl “https://api.twitter.com/friends/ids.xml?screen_name=duemoko&cursor=-1

<?xml version="1.0" encoding="UTF-8"?>
<id_list>
<ids>
<id>114008937</id>
<id>7282592</id>
<id>15027362</id>
</ids>
<next_cursor>0</next_cursor><previous_cursor>0</previous_cursor>
</id_list>

Updating API calls to use Cursor

Note that the current implementation of statuses/followers needs to be updated. No longer needs bool, should use a cursor …

This makes parsing slightly awkward to maintain compatibility with the existing MGTwitter*Parser's

So far the following API calls have optional Cursors:

statuses/friends
statuses/followers
friends/ids
followers/ids

Adding cursor (as its optional) to statuses/friends & statuses/followers changes the xml

with cursor:

<?xml version="1.0" encoding="UTF-8"?>
<users_list>
<users type="array">
<user>
</user>
<user>
</user>
</users>
<next_cursor>0</next_cursor>
<previous_cursor>0</previous_cursor>
</users_list>

without cursor:

<?xml version="1.0" encoding="UTF-8"?>
<users type="array">
<user>
</user>
<user>
</user>
</users>
 
projects/mgtwitterengine.txt · Last modified: 2010/06/13 14:05 by tarasis
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki