Exact Twitter search in Android - android

I have implemented a Twitter search in my android app, when I search for a string I get all tweets associated, but I only want one result showing only the string I'm looking for, not the entire tweets.
For example, if I'm looking for "MTVAwards" I get something like "Hi #MTVAwards, regards from Michigan"... The result I want is "MTVAwards" if exists, if not a button to create it.
I´m only looking for hashtags (#)
Thanks

Related

Firestore search across custom objects array

I try to make an app on Android for services reviews, every review is save like an element in the document "user" like this-
Everytime the user save a report I have see if inside the reports the field "plate" is existing comparing with the new one, I try query using the examples in the page arrays in Firebase
In the code i tried get with "whereEqualTo" method search by "reports.plate" or with the method "whereArrayContains" with the same field (the filter uid exits but in the first image doesn't show) any idea how i can search the document when some of the custom elements fields is equal
maybe sorry in advance for the english i'm practicing
Thanks in advance

Autocomplete text for more than one countries in google map api

I want to pick the cities for Singapore country in android editbox. So i use the place Autocomplete text by using this url,
https://maps.googleapis.com/maps/api/place/autocomplete/json?key=XXXXXXXXXXXXXXXXXX&type=(cities)&components=countries:sg&input=k.
I get the cities in singapore. But my question is, I want to get two country's cities (like Singapore and Malayasia) by using the same url.
I already tried to change the parameters like, &&components=countries:sg,my. But I get the response as INVALID_REQUEST.
Please friends, Kindly help me to solve this.I am in running short of time.
Thanks in advance
You can do it like this:
https://maps.googleapis.com/maps/api/place/autocomplete/json?key=XXXXXXXXXXXXXXXXXX&type=(cities)&components=country:es|country:uk|country:us

Facebook Graph API Groups

I try get information about own groups over Graph API.
On me/groups I get list of groups. But I not understood what is params: bookmark_order.
Also we can see param unread:1. If I right, it present if another user set some change in group (post new comment). If I refresh group page in browser or open in native android app, then unread is no longer appears. After which api request I can remove unread flag?
Also at group's wall I can ask question. But {group_id}/feed not contain this posts. How I can get it?
I have group document. I can get data about this document: subject, message. But if in document I insert image, then in message param I has string about this image: (img:301666969868743). How can I get this image? Simple GET-request with 301666969868743 (I assumed that this long decimal is ID) return false.
bookmark_order (see https://developers.facebook.com/docs/reference/api/user/)
An array of objects containing the version(old-0 or new Group-1),
name, id, administrator (if user is the administrator of the Group)
and bookmark_order(at what place in the list of group bookmarks on the
homepage, the group shows up for the user).
unread
Doesn't appear to be documented. I would presume this would be a read-only value that facebook controls.
Log a documentation bug with facebook and ask them to explain it. (https://developers.facebook.com/bugs?search_view=search&search_ids%5B0%5D=208685622513742)
question not appearing in {group_id}/feed
Tested it and you're right, it doesn't appear. Good find. You should log this as a bug with facebook.
(https://developers.facebook.com/bugs)
Group document with image
When I did an image in a document, I too got the cryptic (img:###) inside the message of the returned object from {group_id}/docs. However I was able to find it on the graph using https://graph.facebook.com/####?access_token=#### and it returned the results. So I'm not sure how to help you with this one

Cannot Facebook "Like" with Graph API's /OBJECT_ID/likes

I'd like to implement a like button in my Android app. The Graph API doc sais publishing likes can be done with /OBJECT_ID/likes.
/OBJECT_ID/likes
Like the given object (if it has a
/likes connection)
However if i implement this:
Bundle par = new Bundle();
par.putString("access_token", ACCESS_TOKEN);
facebook.request(APP_ID + "/likes", par, "POST");
it just does nothing but returns an empty (data content) JSON array. (publish_stream permission is given.)
APP_ID is my app's FB id, and i guess it'd be the OBJECT_ID so i don't understand.
How can i implement then a Like button?
You cannot force users to like your application or your fan page (due to spamming reasons). The only way you can get them to like your page/app is embedding the like fbml code or iframe in a web view. That documentation is in place to like a friends wall post or comment or photo, as those are the types of items you can like for a user, in case for example you were writing a Facebook client. If that is what you are trying to do, don't send the app_id as you are doing, but send the post id of the users post.

What is the proper syntax to execute a google web search from my Android 2.2 application?

Working on an Android application, which needs to execute a google web search from within a ListView activity and display the results in that List View.
Such search would always be for the same "static" subject, such as "...bowling alleys in Chicago...", so, the user will not be entering any search criteria.
What is the proper way to accomplish this, please?
I would just URL-encode the search request, create an URL using the official Google Search API and open this in a browser, which would be:
try {
String search = "your search here";
String encodedSearch = URLEncoder.encode(search, "UTF-8");
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://google.com/search?q=" + encodedSearch)));
} catch (UnsupportedEncodingException e) {
// should not happen, maybe add some Log.e() here
}
Have fun! :-)
EDIT: Oh, I just answered too quickly and now I read that you want to display the search results in a ListView. So basically you will need an API key then and use the official search API by Google. More information and documentation here:
http://code.google.com/intl/de/apis/customsearch/v1/overview.html

Categories

Resources