TADVTwitter - Search

Hi,  i want to search tweets by hashtag (#sometext)  or user (@somebody ), is there a method to do that, including all tweets not only friends or followers  ?

And how about to retrieve user avatar that tweet ?

Thanks in advanced,



Hi,


You can use the TAdvTwitter.Search call to search for tweets that contain a given keyword.
The user avatar can be retrieved from the resulting TStatusList.Items[].User.ImageURL property.

When i try something like
    AdvTwitter1->GetStatuses(30, -1, -1, -1, "HEREAVALIDUSER" );
i got Statuses

but something like
    AdvTwitter1->Search("#HEREAVALIDTAG",30,-1,-1);
always return nothing


Have you tried to assign the result of the Search call to a TStatusList?


Example:
var
  sl: TStatusList;
begin
  sl := AdvTwitter1.Search('#HashTag');

Sorry, my mistake, i assumed that Search works as GetStatuses and adding result in AdvTwitter1->Statuses, i didn't see return type,

Another question: ... I want to save Keys in my own file ( not .ini in Windows ) or my own Datasource
but there is no detail how to use in that cases
AdvTwitter1->PersistTokens->Location =  ??
AdvTwitter1->PersistTokens->Key = ??
AdvTwitter1->PersistTokens->Section = ??
Do you have any example ? ( DataSource or my own file in current drectory )

Thanks

To save tokens to a database set PersistTokens.Location to plDatabase and assign your datasource.

Your dataset should contain the following string fields:

"ACCESS_TOKEN"
"AUTH_TOKEN"
"ACCESS_TOKEN_SECRET"
"AUTH_TOKEN_SECRET"
"REFRESH_TOKEN"
"EXTRA_DATA"

Example:
  AdvTwitter1.PersistTokens.Location := plDatabase;
  AdvTwitter1.PersistTokens.DataSource := myDataSource;
  AdvTwitter1.SaveTokens;