F
F
froosty2015-01-13 14:15:07
Facebook
froosty, 2015-01-13 14:15:07

How to make a facebook page sharing link with a custom image for sharing without using meta tags?

Good day. There is such a problem. There is a site made on the principle of Single Page Application. All data is loaded loaded by Ajax. There is a page with an article (for example, with this address mysite/articles/9063). The page should have a facebook sharing button. With a picture of this article, title and description. It would be possible to write meta tags og:title, og:description and og:image, but this is not possible, because initially, the framework (you can say the layout) of the site is loaded, and then the data is inserted there with ajax. And if you change the values ​​of these tags using js, facebook will not see this replacement. Tell me, is there a solution to this problem? Thanks in advance for your reply.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Nemiro, 2015-01-13
@AlekseyNemiro

Something like this:
http://www.facebook.com/sharer.php?s=100&p[url]=link address&p[title]=title&p[summary]=description&p[images][0]=image link
where p[images ] - a collection of links to images.
But not always can cling.
-------------------------------------------------- ------------------------------
Updated: Unfortunately, this is no longer possible. Only through meta tags.
4ee4a2cc7011466d885181797a78a46d.png

P
Pavel Fomin, 2015-06-06
@Pablohoney

We did something similar at home, but we had to rummage through different pictures from the article.
The problem was solved by passing the page url with a get-parameter like ?image=img_001. And generated og:image through this parameter.
C title and description should work too.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question