I want to do something that I thought would be very simple, but Facebook's docs are beyond confusing to me.
A user (that is known to our servers) visits my site, and our Facebook pixel fires a simple page view event. Lets say the user has a UID of 1234 on our server
Sometime later we use the facebook marketing api to send this information to Facebook: "User 1234 has made 9 purchases, totaling $1,500. Their most recent purchase was on January 12th, 2018"
My question is, can we somehow add this UID to the pixel event so that it can be used later in our api call?
Related
Past & Now
A few years back, Facebook supports FQL in v2.0 to retrieve online friends of an user ( Facebook : Get List of Online Friends Using Graph api )
However this FQL is removed from v2.3, and what's worse is Facebook completely removed Chat API (XMPP) from April 2015.
Goal
Is it still possible to generate a list of Facebook friends and their last active time / currently online using Graph API / or any other method? (basically the same as chat window on Facebook desktop)
This would be useful:
when a user wants to see who's online but don't want to let their friends know they're online atm
or for a simple widget on phone screen, where user can have a quick look at who're online without the need of Facebook login (the widget gets data from 3rd party server which uses API / or some other method to provide that list)
Thanks alot for your input
No, it is not possible - because as you found out already, Facebook removed the required permission/endpoint. The only way would be implement your own routine for this. For example, by storing the timestamp of visiting users. Whenever a friend of that user visits your App too, you can show those to him. Of course it only works for users who authorized your App and youi can only detect if users are online/active in YOUR App, not on Facebook.
I'm wondering, is it possible to notify every user of a Facebook app?
This is what I would like to do:
Let's say I have a Facebook app with 20 000 users and there is new content in the app. Is it possible to send out a message, wall post, notification, .. to each and every user to let them know there is new content without being banned by Facebook?
grtz,
bundy
You can track all the users (and their friends) by id who view the app. If you have prompted the user for the app to allowing posts/sharing etc you can post to users and their friends walls usin those ids. However there is a limit (My account got blocked for a couple of days for for sending approx 600 "Shares", by mistake ..logic error that kept posting... and the app was in sandbox mode, so the rules still apply)
So to answer the question, I would say No. not by wall posts/shares, but you could collect their email address and send them a mail externally with a link to the app.
My experience of FB is using the javascript api to create notifications and posts, I am not sure of the limits in this api and do get confused between "feeds", "Shares", "Notifications" etc... FB is not quite an exact science, it would seem.
For my iPhone app, an user can logged in using Facebook, then the app can get list of friends that already on the app. Now I am wondering - when should the user's Facebook friends be pulled down. Should it be the time when the user start using the app and login with Facebook? Or should it be done periodically in the background thread? Or should it actually be done on my apps' web service side (with the access token received and sent over from the iPhone app) What's the best practice to go with?
The main concerns are
total # of friends could be a large number, which would require a lot of network traffic
time processing
A couple of options:
From your comments below your question, cache friends lists for a minimum of 24 hours. Friend listings rarely change often (unless the user is under 25 years of age, then it might change more frequently...statistically speaking).
Another option you can also subscribe to a user using the Real Time API. Store their friend information on your server and when Facebook tells you they've added a new friend you add it to your data store. Then you can query your own server rather that hitting the Graph API.
I have an fb app connected with my website. it will trigger a post to fb user's wall when he completes a search on my site. Is there anyway to have a limit on the number of posts to the wall? say 1 post per day or 3 posts per week?
Take a look at the Graph API documentation. Basically, Facebook will send you a Graph object for each of the users that log in. You can just keep a table in your DB that maps users to a counter for how many posts you've made to their wall, which you always check before posting to make sure it's not over the limit. When the time period is up, you can just reset the counter.
Here is some example code that will show how to access the Graph object: http://www.devshed.com/c/a/PHP/Facebook-PHP-API-Applications-Working-with-User-Data/
I'm developing a website using Facebook Connect as the only membership/authentication mechanism.
So far authentication and inviting friends work.
Now I'd like to display a list of users registered with my Facebook application. Something like : "There are 1234 members in the AppName community" + a list of profile pictures.
How would I do that ?
Thanks !
This is actually pretty easy to do. After each user connects with your site through Facebook Connect, create an entry for them in some user table (which you're probably already doing). Then when a user logs in simply display the total number from your users table and randomly select 10 user IDs (or whatever number of pictures you want to display) and show them using the FBML <fb:profile_pic> tag http://wiki.developers.facebook.com/index.php/Fb:profile-pic.
There is some metric information available about your application via the Admin.getMetrics API call. I believe it only provides the number of active users within a certain time period however.
The actual total number of users is difficult to track due to people who remove the application, or might have it installed but blocked. I don't think it's available as a specific property anywhere. The information pages about Facebook apps never show the total number of users, only the monthly active users, which is what Admin.getMetrics() can tell you.