Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP] Przycisk share on facebook
shemko
post 16.04.2012, 17:15:25
Post #1





Grupa: Zarejestrowani
Postów: 35
Pomógł: 0
Dołączył: 15.04.2012

Ostrzeżenie: (0%)
-----


Witam, mam dwa pytania odnośnie pewnego kodu do udostępniania linków na facebooku:

  1. <?php
  2.  
  3. $title=urlencode('Title of Your iFrame Tab');
  4. $url=urlencode('http://www.facebook.com/wordpressdesign');
  5. $summary=urlencode('Custom message that summarizes what your tab is about, or just a simple message to tell people to check out your tab.');
  6. $image=urlencode('http://www.yourdomain.com/images/share-thumbnail.jpg');
  7.  
  8. ?>
  9.  
  10. <a onClick="window.open('http://www.facebook.com/sharer.php?s=100&amp;p[title]=<?php echo $title;?>&amp;p[summary]=<?php echo $summary;?>&amp;p[url]=<?php echo $url; ?>&amp;&amp;p[images][0]=<?php echo $image;?>','sharer','toolbar=0,status=0,width=548,height=325');" href="java script: void(0)">Insert text or an image here.</a


czy jest możliwość aby zmienić kod PHP powyżej tak aby można było edytować tylko tekst "write something" a reszta żeby została bez zmian jak przy normalnym kliknięciu "share"?



oraz jak powinien wyglądać kod aby zmieniała się jedynie wartość $summary? w sensie takim, żeby cała reszta ładowała się automatycznie tj. z domyślnymi parametrami filmu youtube (miniaturka, tytuł etc.)

Pozdrawiam.

Ten post edytował shemko 16.04.2012, 17:16:54
Go to the top of the page
+Quote Post
radar22
post 17.07.2012, 13:57:24
Post #2





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 20.02.2005

Ostrzeżenie: (0%)
-----


Pole "message" można podmienić jedynie publikując post przez graph API. Niemniej jednak jest to zabronione przez regulamin FB:

Cytat
2.You must not pre-fill any of the fields associated with the following products, unless the user manually generated the content earlier in the workflow: Stream stories (user_message parameter for Facebook.streamPublish and FB.Connect.streamPublish, and message parameter for stream.publish), Photos (caption), Videos (description), Notes (title and content), Links (comment), and Jabber/XMPP.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 29.06.2025 - 16:48