imrehg / minibook

A Facebook status updater and lister in Python.
MIT License
2 stars 0 forks source link

overlong status updates #19

Closed imrehg closed 15 years ago

imrehg commented 15 years ago

Overlong status updates seem to cause trouble because:

An example, from the web interface I have:

Xxxxx Xxxxxx has mixed feelings about Oberlin's graduation ceremony. On the one hand, those were the world's most boring speeches (and Richard Haass was the speaker? Really?). On the other hand, someone walked in a kimono, someone in traditional African garb, and someone in a tutu and bunny ears.

From facebook it is returned as:

has mixed feelings about Oberlin's graduation ceremony. On the one hand, those were the world's most boring speeches (and Richard Haass was the speaker? Really?). On the other hand, someone walked in a kimono, someone in traditional African garb, and so

(first 255 character of the 284 character status update)

imrehg commented 15 years ago

seems to be an API limitation....

imrehg commented 15 years ago

According to http://bugs.developers.facebook.com/show_bug.cgi?id=5444 this is an API bug that they won't fix. But as a workaround, one can use the "stream" table instead of "status" table, and a query along the lines:

 select source_id, message, created_time, comments, likes from stream where
 source_id in (select uid2 from friend where uid1 = {userid}) or source_id = {userid})
 and attachment='' and target_id='' and created_time > since and created_time < till
 limit 100

as a sidenote, updated_time can be used to be more selective with pulling new comments and likes....

imrehg commented 15 years ago

fix: pull statuses from "stream" instead of "status", Closed by 3b78d59f4285d03e26727c9ef9bc2dde5cdf1a91

Had to convert quit a few things, because UID is int in "status", but str in "stream".