2đź‘Ť
https://developers.facebook.com/docs/reference/api/
Look for the headline “Searching”:
https://graph.facebook.com/search?q=conference&type=event
You need an access token for it, but i guess an app access token will do:
$app_access_token = APPID . '|' . APPSECRET;
The app access token is valid as long as you don´t change the id and secret of the app (will most likely never happen).
EDIT:
If you take a look at the FQL table of the events, there is no field for the “popularity”:
https://developers.facebook.com/docs/reference/fql/event/
…so i guess you mean sorting by “most attending people”. But you wrote “all the newest/popular events from facebook”, so that means all events and not only those of the logged in user and his friends. The only way to get the events in that case is the solution i presented above.
If you want to get the Events of the user, FQL would be the correct way, i guess:
SELECT name,description,location,attending_count from event WHERE eid in (SELECT eid FROM event_member WHERE uid = me()) ORDER BY attending_count DESC
This gives you all events of the user, sorted by the number of attending people.