Facebook trending articles using open graph

I have a facebook open graph application where the user can 'Read' (Action Types) 'Article' (Object Types). In our website we have a 15 seconds timer and when the timer finishes we have the following JS call:

FB.api
(
    '/me/news.reads','post',
    {article:window.location.href}
);

Everything works fine with that module and sometimes we're even in the 'Trending Articles'. I saw that some other sites like 9gag have similar modules, but when you click on their trending article it takes you to their App and you must give permissions to continue. On the other side - when you click on our App - it takes you to the article itself.

I tried to change the window.location.href part with a facebook login URL, but it does not work, because when the FB.api() method is called it checks the og:type of the page. My page has a correct og:type, but the facebook login URL has no such thing.

How to force the links on my social-reader application in facebook to require the user to have permissions first and after the permissions are set - to redirect you to the real article on our site.

Thank you!

Upvotes: 0

Views: 585

Answers (1)

C3roe
C3roe

Reputation: 96383

I saw that some other sites like 9gag have similar modules, but when you click on their trending article it takes you to their App and you must give permissions to continue. On the other side - when you click on our App - it takes you to the article itself.

Then I guess 9gag have Authenticated Referrals enabled:

“Authenticated referrals is a new feature that ensures all referral traffic from Facebook to your application is already connected to Facebook. Visitors arriving to your app will be automatically logged in and, if necessary, be prompted for any permissions you have requested.”

Upvotes: 1

Related Questions