Michael Z
Michael Z

Reputation: 4614

How to find out which user clicked an image on my facebook website/application?

Say I have a facebook page/app that contains images of products that I sell. Is there a way that I can find out who the user details(facebook account) is when an image is clicked?

Upvotes: 0

Views: 423

Answers (3)

CPD
CPD

Reputation: 427

Assumption I am making:

  1. You are using a custom page tab
  2. The page tab is an iframe
  3. You have GDPed the user when they clicked on the body of the tab
  4. You now know the user in the app on the tab
  5. All actions by the user contain the user ID (so you can customize the experience)

Then you're already done!

C @ facebook

Upvotes: 1

ovi
ovi

Reputation: 441

From my knowledge, the user has to connect with your app first, before you can get his user id. After you have this piece of information, it's rather simple to log all his requests.

Assuming that clicking on a product image doesn't necessarily send the user to a new URL, but maybe shows a zoomed image or shows more information, you could use Javascript to send an Ajax request to your server containing information about the product and FB user id. The URL can look something like this:

http://example.com/log.php?uid=xxx&product_id=ppp

Then server-side you'll store the information in the database.

Upvotes: 0

genesis
genesis

Reputation: 50982

you can take it by IP from access log, or you have to aim all images to php file (to log user data) before showing image

Upvotes: 0

Related Questions