0

I want in my app to save ip from user and then redirect to another page. Problem is when I past this link to facebook they go to page and show not my link but link that is redirected (because they visit my app).

I use akka-http and on complete I send http response with status 307 and header locaction with redirect link.

Can I somehow avoid this facebook behavior?

  • You mean, can you get the IP addresses of people that view your stuff on Facebook, i.e. see the post with your shared link? No, of course not. – CBroe Sep 06 '16 at 13:18
  • No, I write about case when someone put link on facebook wall. And facebook publish they 'link window' with redirected link. Someone click on this and don't visit my app but directly go to redirect location, so I don't save ip. – Stanislaw Slodyczka Sep 06 '16 at 13:25
  • I still don’t see what “Facebook behavior” you mean here. Yes, Facebook has their own script to take users to the target URL – but what does this have to do with your app? – CBroe Sep 06 '16 at 13:29
  • My app is not app on facebook, but app on my server. My problem is that facebook when visit my app and get redirect they show on wall post this redirected address not my app address. So if someone click they don't visit my app but this redirect link. – Stanislaw Slodyczka Sep 06 '16 at 13:59
  • Well then you need to implement an exception of the redirect for the FB scraper (can be recognized by its user-agent, see social plugins FAQ, I think it is somewhere in there), so that it does not get redirected and can read the relevant OG meta data directly from your app URL. – CBroe Sep 06 '16 at 16:34

0 Answers0