Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PremiumTurk/6d94726563a7bc92b7d91d29a20d0247 to your computer and use it in GitHub Desktop.
Save PremiumTurk/6d94726563a7bc92b7d91d29a20d0247 to your computer and use it in GitHub Desktop.
facebook_autoshare_premiumturk.php
<?php
// #Premium-turk.net tarafından yazılmıştır.
// #Lütfen yorum satırını paylaşırken değil kullanırken silin...
// Facebookta Paylaş
require_once(ENGINE_DIR . "/PremiumTurk/facebook.php");
$config = array();
$config['appId'] = 'xxxxxxxxxxxxx';
$config['secret'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx';
$config['fileUpload'] = false; // optional
$fb = new Facebook($config);
$params = array(
"access_token" => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", // Token için Facebook Dev adresi: https://developers.facebook.com/docs/facebook-login/access-tokens/
"message" => "Konu açıklama satırı",
"link" => "Tıklayınca yönlendirilecek adres",
"picture" => "Konu link satırındaki görsel",
"name" => "Link satırı içerisindeki başlık",
"caption" => "Sayfanın en altında görünen bölüm Örnekte: 'WWW.PREMİUM-TURK.NET'",
"description" => "Link önizlemesinde başlık altındaki açıklama"
);
try {
$ret = $fb->api('/Facebook Sayfa ID\'si/feed', 'POST', $params);
echo "<script>alert('Konu Facebookta Paylaşıldı. www.premium-turk.net Yorumda başarınızı paylaşın :)')</script>";
} catch(Exception $e) {
echo $e->getMessage();
}
// Facebookta Paylaş
// #http://www.premium-turk.net/php/64-facebook-otomatik-paylasma-oto-auto-share-sdk.html
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment