How to get long list of users searched by keywords

Jun 4, 2015 at 4:55 PM
Hi Linvi:

I need the same code for searching user by specific keywords.

Thanks
Regards
Coordinator
Jun 6, 2015 at 5:34 PM
Hi,

Searching for users does not have the same maximum result nor do they have the same RateLimits.
Furthermore user search returns user objects and not user ids.

Finally user searches uses a paging mechanism instead of a cursor one. The only thing you will have to do is iterate over the page results.
var searchPage2Results = Search.SearchUsers("my_search", page: 2);
Cheers,
Linvi
Jun 7, 2015 at 12:50 AM
Great Linvi, but how I get the total pages of a search.

P.D. -> I read that with new API we can change profile properties. It´s possible to change images, descriptions and url´s?

Thanks
Cheers
Coordinator
Jun 7, 2015 at 1:44 AM
Edited Jun 7, 2015 at 1:44 AM
Great Linvi, but how I get the total pages of a search.

You have to iterate over until you have an empty result set.

P.D. -> I read that with new API we can change profile properties. It´s possible to change images, descriptions and url´s?

I am sorry I don't understand your question :(

Cheers,
Linvi
Jun 7, 2015 at 8:33 AM
1 - Ok!

2 - I have read that with new version you can update Account Settings and I want to know if it´s possible to change background profile, avatar, description and url.

Thanks in advance
Have a nice day!
Coordinator
Jun 7, 2015 at 11:57 AM
Hi,

Concerning your second question, regarding profile settings, it has not been implemented.
I have been asked the same question yesterday. I have never received any request since Tweetinvi started regarding the profile settings.

This was initially planned for version 0.9.10.0 but I am considering moving it to the next release. I am not sure yet if I will do this because 0.9.9.0 has already enough tasks for a single version.

But please let me know if you consider this as a priority. I am always taking the developers priority into consideration for every major release :)

Cheers,
Linvi
Jun 7, 2015 at 1:44 PM
Thanks!, for me it´s a priority but I understand that you are working so hard.

I am waiting for next releases.

Thanks for your support and your excellent work.
Huges!
Coordinator
Jun 12, 2015 at 12:01 PM
Hi,

I just wanted to let you know that Tweetinvi gives access to the TwitterAccessor class that can let you execute a query on Twitter.

Here is an example on how to change the profile image:
byte[] file = File.ReadAllBytes("filepath");
var media = Upload.UploadBinary(file);

var query = string.Format("https://api.twitter.com/1.1/account/update_profile_image.json?media_id={0}", media.UploadedMediaInfo.MediaId);
var success = TwitterAccessor.TryExecutePOSTQuery(query);
Cheers,
Linvi
Jun 14, 2015 at 2:08 PM
Hi Linvi:

Great code for updating Twitter accounts, but the search users pagination code it´s not working properly:

Search.SearchUsers("my_search", page: 2);

I have tested with "marketuit" query and the Web Twitter interface returns 3 results and your method returns 20 results and when
I change the page always return the same results.

What´s the problem?

Thanks!
King Regards
Coordinator
Jun 14, 2015 at 9:02 PM
I will have a look into it.

Cheers,
Linvi
Jun 18, 2015 at 9:50 AM
Hi Linvi:

Any update?

Have a nice day
Coordinator
Jun 18, 2015 at 12:32 PM
Hi,

Sorry for not replying earlier. I have been quite busy with the release of 0.9.8.0.

I have been able to reproduce your bug and I will work on this as part of 0.9.8.1.
This should therefore be available quite soon. If not I will give you some workaround.

Cheers,
Linvi
Coordinator
Jun 18, 2015 at 2:04 PM
I have identified the issue and I have fixed it in the latest source code. You can download the binaries here.

I think this code is no longer working based on some changes on the Twitter API that I must have missed since this code was done.

IMPORTANT
Twitter is now always returning results for any page. It means that if there are only 3 user matching your search and you request the page number 2, it will return 3 results.
You will therefore need to compare you results if needed.

Cheers,
Linvi
Marked as answer by linvi on 6/18/2015 at 6:04 AM
Jun 18, 2015 at 2:39 PM
Hi Linvi:

Twitter changes are WTF!!

Return null values it´s much better because now I have to compare results and increment the code and resources. Fuck logic, xD

When you publish this version on Nuget?

Thank you so much, crack!