Count Facebook-users with a certain name - php

I want to check a name with Facebook to display how many users are on Facebook (generally) with the same name. I'ld like to display this on my website.
I know that it's possible, I see on different websites this information:
+/- 14225 Zoltan's on Facebook (Position #4454)
But I have no idea were I can find a script for this. I searched everywere but couldn't find anything. Is there someone who can help me, please?

The most near results that you can using the Graph API is using-
http://graph.facebook.com/search?q=jeroen&type=user
(needs a valid access_token)

Related

Why do geotargeted posts not appear in API even with accesstoken?

This has been asked before but I haven't seen a definitive answer. Hopefully someone has an answer. Basically, it seems impossible to pull any post that is geo-tageted via the API becasue it has privacy settings, that is, a country set to who can see it.
I am using https://graph.facebook.com/".$pagetoprocess."/posts?&access_token=".$att and this will pull the posts but not any posts that are geotargeted to the UK for example.
If I create an accesstoken from a user who is an admin of the page then I see all posts including geotargeted posts.
Why would this be? how can I see all posts for any page whether I am an admin or not or whether it is geo-targeted?
I would have thought that if you creaded an app in the UK and therefore had an app and secret id code from which you then generated a user access token, why would you not be able to see a post from a page geo-targeting the UK? Seems strange.
Any ideas?
Thanks
Jonathan
I would think that all posts would appear, or at least that is what it says on the api. You could try using feed instead of posts, since posts is a derivative. You might also try using:
&include_hidden=TRUE
But I'm not sure that will help.
If you have the page url, I'd be willing to see if I can play around with it in the graph explorer.

Facebook App - Browsing Random Posts

I've been tearing through the Facebook API documentation and beginner-level tutorials on the basics of an in-Facebook app and am starting to get a grasp of the basics. I'm looking to develop an app for a semester-long project for school and was wondering if anyone might be able to point me in the right direction of what documentation/tutorials to look for. To give some further context, here is the basic idea behind the app:
It will allow users to fill out basic drop-down form filters (Friends lists, date ranges, post types, etc.) and then press a button to 'stumble' to a random existing post (i.e. a random picture from 2 years ago, a random status or wall post from 3 months ago, etc.)
I was thinking of maybe looking further into FQL, but would just like to get some advice before proceeding.
Thanks in advance!
I have yet to find a way to do a stem search via the Graph other than from the http://graph.facebook.com/search? link. See: http://developers.facebook.com/docs/reference/api/ and look for the search section.

Get number of twitter shares by url

I have a question about twitter counting. Everything is so blury about this.
Simply:
I have website with dynamic pages, button for tweet, people go to page, press tweet, it shows on they twitter, count on my page increase. but I need also on my backend to call to twitter and ask them how many shares i have already and count with that.
It is concept for voting. People by sharing to facebook and twitter are voting for the website, so i need to take those votes and count them together. Please dont recommend me scripts like "sharecount" i tried and it has a lot of issues, and its not reliable.
I can get easily likes from facebook but i dont seems to get how to get the number of shares from twitter.
Also if anyone can help me, is there a way to get shares from unique users ? I noticed that if i tweet the site 50 times, the counter is 50. I would like it to count 50 tweets from 1 user as 1.
Thanks for help!
See the private API method http://urls.api.twitter.com/1/urls/count.json?url=

Getting the user_id through Foursquare Api V2

I'm working on a foursquare integration for a social good website, and I have everything working as I want it to, however I want to retrieve and store users foursquare user_id's so others can search for their friend. I've been searching all day, but I can't seem to find an end point, am I missing something? Or does this has to be done through user search? What is then best to use, as I have their email, and full name.
I am using jmathai's foursquare-async php libary. I think it should be easy but I just can't figure it out.
I've found the solution. To get an users' details you should use the end point "users/self". I had tried this before but got an error message. I think that was related to something else now.
After authenticating two lines are simply enough:
<?php
$fsObj->get("/users/self");
print_r($creds->response);
?php>
This gives an json array containing all relevant information on the user, including last checkins, name, and id. 'self' can here also be replaced by any user id you're authorized for on that moment.
For more information I'd recommend to visit Foursquare Api website

Tracking user clicks back to Google Adwords API

I am going around in circles a bit with this one trying to find a solution online and I cant find one so I thought I would ask then it may be useful to others as well.
The scenario.
With PHP I am looking to talk back to the Google Adwords API. OK not a biggy. However I want to tie it in with our own back office system to marry up data from sales/conversions to impressions/clicks/costs of each campaign/adgroup in Google Adwords.
This would involve tagging the destination URLs I initially thought with the dynamic tag from Google of {creative} for example http://www.mydomain.com/productone/?adid={creative} however this appears to be a number which is not unique across the account but unique only under Adgroup. So AdgroupOne and AdgroupTwo could both have an adid of 1,2,3,4,5 etc.. Therefore you cannot use this id to pull the data.
Has anyone else encountered this? Is there a way of getting around it to get a unique indentifier which can be stored in the backoffice with each visit to trace back to Google Adwords via their API?
Really appreciate the help with this one as its got me stumped. Thanks guys.
The easiest way to fix this would be to provide your own ids in the url. Also maintain a map at your end, of the form (adgroupid, adId, your_tag_id). This way you can lookup the map to figure out what Ad was clicked when a url is hit.
Some id rules to keep in mind:
campaignId: Unique across system.
adGroupId: Unique across system.
adId: Unique within an adGroupId, so (adGroupId, adId) is unique across the system.
keywordId: Unique within an adGroupId, so (adGroupId, keywordId) is unique across the system.
Cheers,
Anash

Categories