Search Facebook events by location - php

I am planning to use FB API to access "Events". For an example if I select Sri Lanka. All events by that location. If you guys had any luck with that let me know. I am browsing trough FQL to get this done didn't have much luck.
This does look like something helpful , i found it from a search , but couldn't. Get it to work as I need.
https://graph.facebook.com/search?q=coffee&type=post&geo=id&lang=indonesia&location=indonesia
Please post me up if you guys have any idea.
PS : Final outcome it to grab Events from FB and post on a blog something similar to tumblr.

I haven't done much work on Facebook platform but the following information might help you:
Read the Developer Documentation as it will tell you how to use API methods and what are their limitations
From what I understand, you can use https://graph.facebook.com/me/events?access_token=[a valid access token] to get events that the current user has been invited to or hosting. It is important to understand that this information are per user basis and each user will have to authorize your application to use information about their subscribed events. This means that it may not be possible to do something like 'Get a list of all events taking place in Colombo, Sri Lanka'. However you could use the above mentioned api method to collect data from users who use your application. You can then use this data retrospectively create a graph showing all public events information.
Hope that helps.
Dinesh.

Facebook doesn't support searching for events by location from the API. However you can use the graph search like this: https://graph.facebook.com/search?q=srilanka&type=event this will search for events having "srilanka" in either the description or the name or as their location. This does not guarantee that the events are from sri lanka but you can filter out the results based on the "location" field returned by the api.

Related

Twitter API Get Only User Tweet

I am using Twitter's API to retrieve user tweets (via screen name). However this is returning all "retweets" and random replies to other twitter users. I've been searching through Twitter's API to find a way to ONLY pull back the tweets instead of both tweet & reply but can not find a good solution. Could anyone lend a hand?
Thank you.
Have a look at this doc. Simply add parameters
exclude_replies=true & include_rts=false
along with your query. This will filter the retweets and replies!

How to add an event to other person's Google Calendar with PHP API client?

I am working on a web application with a build-in agenda. I want to add the items that have been added in this build-in agenda, to the user's Google Agenda. But there is one thing I am wondering. How to get access to that user's Google Agenda?
I was able to get access to my own agenda by adding the XXXXXX#developer.gserviceaccount.com email to the list of addresses that have access to my agenda. But asking everyone to do this isn't really user friendly.
So does someone know the best way to request access to another person's agenda so I can add events through the Google PHP API client?
Thanks in advance!
Consider using Oauth tokens. See https://developers.google.com/accounts/docs/OAuth2
and https://developers.google.com/google-apps/calendar/auth

How do I get information about shared Circles on Google Plus?

I'm using the Google Plus API for a project that I'm working on. I'm hoping to be able to get information about shared circles in which a particular user has been included.
I've seen this active on Circle Count. For example, half way down Guy Kawasaki's profile page (http://www.circlecount.com/p/+GuyKawasaki), you can see the number of circles in which he has been shared. It also includes information about each circle like the date it was shared, the number of users that were included in it and a few more details.
I'm using PHP and am hoping to do this through the API, but I don't see any options for this type of information in the API. When I use the API to get information about activities, I don't see any field that seems to identify a shared circle post as anything different from any other post.
If you know a way to workaround the lack of support for this in the API through some form of a hack, please feel free to let me know.
Try looking over here: https://developers.google.com/+/domains/getting-started
Read the names of a user's circles and the membership of each circle
Google+ API v1 NO
Google+ Domains API YES
So I get on this url (Google+ Domains API): https://developers.google.com/+/domains/api/#Circles
Where the information about circles can be retreived. With this call:
/people/{userId}/circles

Check-In/Map API

I'm trying to get some information for a application we would like to develop for our business. We run a chain of stores (approximately 20) and would like to give our customers reward points when they check-in to our store location. We would also like to display that information our company site eg. "Client X has checked in Location Y". I was wondering if anyone can point me to any API(s) or solutions that may be able to achieve something along these lines? I was looking at the foursquare API, is this a viable option? or is there any other recommendations?
Thank you
As Fahri pointed you can use 4sq API, but nowadays all socials integrate geolocation. You can share your position also using Facebook and Twitter. I will suggest to use the last two, because they has integrated authentication, and API since iOS6, probably they are also more used than 4SQ.

Inviting app users to an app created event - is it possible?

I have a question regarding the creation of event invites by a facebook application, and the ability to invite the users who have approved that applications permissions to this event.
For example, we are a local nightclub who have an app allowing users to connect with the app to see who else is attending events etc, and keep up to date with information about the events we host. It would be ideal to be able to send an event invite to these users when we have special events or theme nights.
Currently the app has around 10,000 approved users.
Just really looking to find out if this is at all possible with the new open graph api? In particular the info provided at:
Event API Reference
How To Use the Graph API to Manage Events
There does seem to be some confusion over what these posts say can be achieved, and what actually can be achieved.. unless those that I have previously spoken to are still basing their opinions on the old rest api.
Clarification and pointers appreciated!
The HTTP POST if you use the ?users= can only handle so many IDs before the length of the url overruns. Since it's a post, you can specify the users parameter and then a comma separated list of ids for the value. Try it out here: http://developers.facebook.com/tools/explorer?method=GET&path=me

Categories