Vennsoh
Vennsoh

Reputation: 4991

Facebook Open Graph: URL to use for sharing?

I am creating a customised Facebook share button. The idea is upon clicking on the Facebook share button, it will pick up the meta tags on the page and prefill the share information with a title, description and image that have been curated.

What URL should I be using for the button? There is https://www.facebook.com/dialog/share and https://www.facebook.com/sharer/sharer.php

I heard the latter has been deprecated? And you can append a whole bunch of information to the URL as well?

I can't quite figure that out.

Upvotes: 0

Views: 160

Answers (1)

andyrandy
andyrandy

Reputation: 73974

sharer.php is not deprecated. It was, for some months, but you can definitely use it. The benefit of using sharer.php is that you don´t need to create an App. It´s the easiest way to implement sharing.

Keep in mind that sharer.php ONLY takes the URL as parameter, everything else will get loaded from the Open Graph tags.

For example:

https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Ffacebook.com%2F

Upvotes: 1

Related Questions