Search "ALL" public events using Facebook graph search API - facebook

Although this question has been asked before but that was an year before and not exactly what I wanted to ask. So, here it goes:
I am using https://graph.facebook.com/search?q=conference&type=event to find all the events having a keyword "conference".
Question 1: I just get one page of results and the pagination link at the bottom of the page yield to a page with no data (just some structure). However, searching from my facebook I can see many many more events. How can I search for "ALL" (or a considerable number of events say 200+) ?
Question 2: In case, if the search results are limited how can I restrict to events from just one country. So, for example I am only interested in conferences that are in US and not the ones in Europe. How do I do that?
Question 3: How do I search for multiple keywords. Say I want to search for "conferences AND data".
I would appreciate your help.
Thanks
P

To search for multiple keywords, use "+". In this case "conferences+data".

about Question 1: note that q=conference means that you are searching for events with keyword conference in them. You are not searching events by category. If you want to search for all events you can use q=*, this will give you ALL public facebook events. They will not be filtered by location/distance. I have tried to limit the search by location & distance, but so far without any success.

add &limit=200 to your query string

Related

Adding specific number of sections in a google form

When an user enters a number into a field (representing the number of persons in a group), I want to have a section of google forms to be multiplied that many times - one for each person. In each such section I need to enter their details. Anybody did something similar to this ?
I think what you're trying to do isn't possible (without using App Scripts) but I have built a little example of something that might work for you. Please see if this will work and get back to ASAP.
Pretty much it has a title page asks the user how many people they want to sign up. Then, depending on the answer, the form directs them to a section with the appropriate number of sign-ups.

How can I find all public comments for a Github user?

Until recently I was able to find all my public comments using a link on my profile page. I was using this functionality to keep track of all issues where I have commented, but not contributed anything. It was under a section called "Public Activity".
This function seems to have been removed. I can not find anything about it on the help page about profiles.
Does anybody have any information on when and why this was removed?
You can do this with an advanced search query. In the Issues search box, enter "commenter:username".
Or if you want to search a specific repo: "RepositoryName commenter:username".
This link is quite useful, it's a live feed of all issues you've commented.
https://github.com/notifications/subscriptions?reason=comment
Alternatively, this link is also helpful and is probably what the OP asked (issues where one has written comments):
https://github.com/search?l=&q=commenter%3AVadorequest+is%3Aissue&type=issues
Replace "Vadorequest" by the username you're looking for
You can also use the global search with commenter:Vadorequest is:issue to achieve the same result
Also, if you want to track discussions you participated in, this link might help:
https://github.com/search?l=&q=commenter%3AVadorequest&type=discussions
Replace "Vadorequest" by the username you're looking for
You can also use the global search with commenter:Vadorequest to achieve the same result
This 4th (and last) is not related to the OP's question, but might come in handy. It lists all PR you were requested as reviewer.
https://github.com/notifications/subscriptions?reason=review_requested
Type involves:<username> in the search box on the GitHub's main page. This will find all the issues that the specified user commented on, was assigned to or mentioned in.
For example, if the user's name on GitHub is unclebob, the search query should look like:
involves:unclebob
Or when searching information about yourself if you're logged in to GitHub, simply:
involves:#me
Note, that unlike involves similar search qualifiers - author and commenter - will omit certain results from the search:
author will find only the issues that were started by the user; if the specified user comments on the issue that was started by someone else, author query won't return it in the search results.
E.g., compare involves:unclebob and author:unclebob type:issue.
commenter will find only those issues where the specified user commented second or later (creator of the first comment in an issue is considered its author and not a commenter); if the user starts an issue and then never comments on it, the commenter query won't return it in the search results.
E.g., compare involves:unclebob and commenter:unclebob.
In other words, when it comes to searching comments, author and commenter return only a subset of involves' results. So I recommend using involves not to miss anything.
Since GitHub Universe 2016, the profile page has changed.
It still has a "Contribution activity" though, which includes your own comments. But you might need to click on "Show more activity" to see past the last few weeks.
And you can email yourself your own activity since last June: "Email updates about your own activity".
If you want a list of all issues where you either created them or were a commenter on them, this link works best:
https://github.com/notifications/subscriptions?reason=author,comment

Displaying most popular post on Tumblr blog

I've been tasked with adding "Most Popular" functionality to a Tumblr blog. Essentially, when the Most Popular button is clicked, I need to display either a single post, or a list of posts, ordered by their popularity. The popularity will be calculated based on the number of "notes" that the post has.
Does anyone have a suggestion on the best way to go about this? I can't find anything baked into their theme customization at http://www.tumblr.com/docs/en/custom_themes#search. Is going the API route the only way to accomplish such?
Well, I'm no expert with Tumblr but I have worked a fair share with the API for a project I'm developing. From my experience it seems you would need an API to get all of the posts note count. Using a theme I know to order the posts shown on the page without an API key, but to go further back you'd have to use a javascript plugin or just use the Tumblr API (it's surprisingly easy to use)
From my short time I just spent thinking about the issue, you could put a NoteCount on each of your posts (hidden with CSS or not; up to you) and then use the API's notes_info to obtain all of those numbers and compare them. You'd then store how ever many posts you want (according to the note count) in an array and use that array on the page you want. It seems like a lot of work, but I'm not sure how else you could do it
EDIT
After investigating the issue a bit, I found that note count is far from a consistent feature on Tumblr. There is no one class that all note counts share nor is the text around it consistent. It seems that you would have to do it on an individual blog basis. Once you obtain the HTML for the posts, through a script or the API, you can run a function similar to the following which uses regex to detect where the note count
var posts = document.querySelectorAll('.post'), // Get all posts (*most* blogs have this, not all)
noteExpr = /with ([0-9]+) notes/, // Get any numbers between "with " and " notes"
noteCounts = [];
// Creates an array filled with all of the note counts
for(var i = 0; i < posts.length; i++) {
noteCounts.push(noteExpr.exec(posts[i].innerHTML)[1]);
}
// Do something with noteCounts
Demo, using posts from one of my favorite blogs MotionAddicts
Some more examples using sites I look at:
For 58 notes use />([^>]+) notes/
For <div class="notecount">Notes: 218</div> use /Notes\: ([^>]+)</
The downside is this has to be customized for each blog if they vary in the format, but it is the only way I know how to without using the API, even then I'm not sure there is a better way
Other info:
Studiomoh had a similar plugin but it only works for pictures
Example of how to include a NoteCount
How to include a note count when there are no notes

facebook graph api search rules

Does anyone have any idea what boolean logic is acceptable on the facebook graph api? They have the worst documentation, forums, assistance known to the developer world. I tried using OR and it does not seem to be working. AND seems to be implied with spaces or commas.I am trying to search for multiple terms or using OR and NOT.
You can do AND and OR, when searching for posts, like:
http://graph.facebook.com/search?q=watermelon%20|%20banana&type=post
The AND operator you can use with space or +:
http://graph.facebook.com/search?q=watermelon%20banana&type=post
You can search for terms like "bruce lee" too, using "":
search?q="bruce lee"&type=post
Resuming: " | " = OR
" " and "+" = AND
I did not find a way to use the NOT operator
And I agree, it is the worst API documentation ever.
It seems, | is not working any more, I've just discovered it today. Only posts matching ALL words from query are found.
Only to share:
'POST' search will no longer be possible from April 30th 2015. See https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_graph_api under the paragraph "Removed endpoints":
Public post search is no longer available.
(/search?type=post&q=foobar)
Right now if you enter a number of words in the search term, separated by space - then you should get back relevant entities that have those words (anywhere in the entity, in any order). "bruce lee" --> "Bruce is a nice guy, he likes Lee" would be a possible result.
There is no "or" operator that works.
I opened a case at Facebook, which was closed hours later for the reason it "works as specified" here: https://developers.facebook.com/x/bugs/138296099674000/
This is a bug tracking tool, but the details you added here don't
represent a bug report - it appears to be you asking for assistance on
how to make certain things work in the search API or a feature request
for the search API to start supporting different operators - only the
behaviours documented here are
supported:https://developers.facebook.com/docs/reference/api/search/
Obviously I can't disagree with the correctness of this claim (especially given #tesserex and #vbNewbie 's observations above) BUT let's not give up.
Since I think we all agree the current functionality is limited / limiting, I would like to encourage all of the people that agree with me to open bug reports and / or feature requests (how do you open a feature req. for FB?) so that this will get prioritized correctly.
I don't think the current functionality does Facebook or the developers any good, and I don't think it should be a major effort for FB to improve it significantly.
So let's gently apply some pressure ;-)
It's not working like that anymore, but I'm finding that this will work now (for search for watermelon OR banana: http://graph.facebook.com/search?q=watermelon&q=banana&type=post

Design ideas for multi-select items from a long list

I'm developing a system in which I need to select, from a long list os customers, some to which an specific (batch) action will be executed. For example, I want to select "John", "Peter" and "Steve" and click the "delete" button. No more than 5 customers will be selected.
The problem is that, since there're more than 500 customers, listing all isn't a good option. So far I did an AJAX search that shows just the customers that meet the criteria, but which multiselect way you recommend?
My best idea so far is a below this list in which I could either drag-and-drop the users I want to select or double click them
Any better ideas/examples?
Thanks
I don't know whether you're using jQuery, nor whether your site's design vocabulary is suited to it -- but this jQuery autosuggest plugin is excellent.
+1 for ksr's autosuggest find. I would use this in conjunction with a list box. The user types in the autosuggest input field and when they select an item it adds it to a list box. They can then add additional names via the same method, and submit the list when they've added all the names.
I would go for the pattern used by eBay. They probably did some usability research. You can find more info here: http://quince.infragistics.com/Patterns/Multiple%20Selection%20from%20a%20Large%20List.aspx