Facebook sharer geeft 404 melding
Het begon allemaal met dat facebook eerst geen foto meer liet zien in de content sharer.
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<meta name="robots" content="index, follow">
<meta property="fb:app_id" content="mijn facebook api ID" />
<meta property="og:type" content="stock_sharer" />
<meta property="og:url" content="http://www.mijndomein.nl/facebookshare/index.php" />
<meta property="og:title" content="Daddy Design - Custom iFrame Share Button - Demo" />
<meta property="og:image" content="http://www.mijndomein.nl/facebookshare/images/customthumbnail.jpg" />
<meta property="article:author" content="https://www.facebook.com/mijndomein" />
<title>Daddy Design - Custom iFrame Share Button - Demo</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<base target='_blank' />
</head>
<body>
<div class="wrapper">
<div class="top">
<img src="images/dd_logo.jpg" alt="" />
</div>
<div class="body">
<div id="button">
<?php
$title=urlencode('Title of Your iFrame Tab');
$url=urlencode('http://www.facebook.com/mijndomein');
$summary=urlencode('Custom message that summarizes what your tab is about, or just a simple message to tell people to check out your tab.');
$image=urlencode('http://www.mijndomein.nl/facebookshare/images/customthumbnail.jpg');
?>
<a onClick="window.open('http://www.facebook.com/sharer.php?s=100&p[title]=<?php echo $title;?>&p[summary]=<?php echo $summary;?>&p[url]=<?php echo $url; ?>&&p[images][0]=<?php echo $image;?>', 'sharer', 'toolbar=0,status=0,width=548,height=325');" target="_parent" href="javascript: void(0)">
Share our Facebook page!
</a>
</div>
<div class="goback">
<p><a href="http://www.mijndomein.com/wordpress/how-to-create-a-custom-facebook-share-button-for-your-iframe-tab/">
Go back to reading<br />
"How to Create a Custom Facebook Share Button for Your iFrame Tab"
</a></p>
</div>
</div>
<div class="footer">
<p>© Copyright 2011 <a href="http://www.mijndomein.com/">mijndomein</a>. All Rights Reserved.</p>
</div>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<meta name="robots" content="index, follow">
<meta property="fb:app_id" content="mijn facebook api ID" />
<meta property="og:type" content="stock_sharer" />
<meta property="og:url" content="http://www.mijndomein.nl/facebookshare/index.php" />
<meta property="og:title" content="Daddy Design - Custom iFrame Share Button - Demo" />
<meta property="og:image" content="http://www.mijndomein.nl/facebookshare/images/customthumbnail.jpg" />
<meta property="article:author" content="https://www.facebook.com/mijndomein" />
<title>Daddy Design - Custom iFrame Share Button - Demo</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<base target='_blank' />
</head>
<body>
<div class="wrapper">
<div class="top">
<img src="images/dd_logo.jpg" alt="" />
</div>
<div class="body">
<div id="button">
<?php
$title=urlencode('Title of Your iFrame Tab');
$url=urlencode('http://www.facebook.com/mijndomein');
$summary=urlencode('Custom message that summarizes what your tab is about, or just a simple message to tell people to check out your tab.');
$image=urlencode('http://www.mijndomein.nl/facebookshare/images/customthumbnail.jpg');
?>
<a onClick="window.open('http://www.facebook.com/sharer.php?s=100&p[title]=<?php echo $title;?>&p[summary]=<?php echo $summary;?>&p[url]=<?php echo $url; ?>&&p[images][0]=<?php echo $image;?>', 'sharer', 'toolbar=0,status=0,width=548,height=325');" target="_parent" href="javascript: void(0)">
Share our Facebook page!
</a>
</div>
<div class="goback">
<p><a href="http://www.mijndomein.com/wordpress/how-to-create-a-custom-facebook-share-button-for-your-iframe-tab/">
Go back to reading<br />
"How to Create a Custom Facebook Share Button for Your iFrame Tab"
</a></p>
</div>
</div>
<div class="footer">
<p>© Copyright 2011 <a href="http://www.mijndomein.com/">mijndomein</a>. All Rights Reserved.</p>
</div>
</div>
</body>
</html>
- Aar -:
Gelieve in het vervolg bij code de [code][/code]-tags gebruiken.
Alvast bedankt!
Alvast bedankt!
Gewijzigd op 07/04/2014 14:01:46 door - Ariën -
Meer info http://www.joshuawinn.com/facebooks-sharer-php-longer-deprecated-2014/
of gebruik deze https://www.facebook.com/dialog/feed?app_id=YOUR_APP_ID&redirect_uri=YOUR_REDIRECT_URI ( info https://developers.facebook.com/docs/reference/dialogs/ )