Y
Y
yaroslavgrishajev2015-02-03 14:32:39
PHP
yaroslavgrishajev, 2015-02-03 14:32:39

How do I edit the details of the Facebook and Google Plus Share window?

Good afternoon! I'm trying to edit the window and information in the "Share" window in FB and Google+.
I do it like this: I
set the variables:

<?php
    $title = 'Мне понравилась песня Stassabiomassa - Song Title';
    $description = 'Короткое описание';
    $summary = $description;
    $url = 'http://stassabiomassa.com/%23mudak-song';
    $url_noencode = 'http://stassabiomassa.com/#mudak-song';
    $image_url = 'http://stassabiomassa.com/mudak-song.png';
?>

<a class="facebook flaticon-facebook32" href="http://www.facebook.com/sharer.php?s=100
&p[url]=<?php echo $url_noencode; ?>
&p[title]=<?php echo $title ?>
&p[summary]=<?php echo $summary ?>
&p[images][0]=<?php echo $image_url ?>" onclick="window.open(this.href, this.title, 'toolbar=0, status=0, width=548, height=325'); return false" title="Поделиться ссылкой на Фейсбук" target="_parent"></a>

<a class="g-puls flaticon-hand131" href="https://plus.google.com/share?url=<?php echo $url ?>" title="Мне понравилась песня Stassabiomassa - Song Title" onclick="window.open(this.href, 'Мне понравилась песня Stassabiomassa - Song Title', 'width=800,height=300'); return false"></a>

In FB, a window with a standard description still pops up: a link to the site, and the title of the page, and not the one I indicated. Plus, I have a lot of such objects and each has its own description.
For G +, where do you need to shove the description. VK, Twitter with this approach work perfectly. I’m exploring the Internet, but somehow it’s been too long and I haven’t found the norms of the solution yet. So if anyone can help me I'd be very grateful!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Krichko, 2015-02-12
@yaroslavgrishajev

As far as I know, fb doesn't care what you post there. He still then climbs the url and parses the page. In order for it to grab what it needs, the open graph meta tag format is used.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question