Created
January 25, 2017 17:05
-
-
Save m4olivei/01251b13063b5c21c88c420c4c56982f to your computer and use it in GitHub Desktop.
Apple News Facebook Post components
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Straight posts | |
// Works! By giving the href query string param as the Facebook post component URL | |
<iframe src="https://www.facebook.com/plugins/post.php?href=https://www.facebook.com/latentximage/posts/1746511762041579&width=500" width="500" height="626" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe> | |
// Resulting Facebook post component | |
{ | |
"URL": "https://www.facebook.com/latentximage/posts/1746511762041579", | |
"role": "facebook_post", | |
"layout": "spacerLayout" | |
} | |
// Photos - First form of photos embed | |
// Works! By giving the href query string param as the Facebook post component URL | |
<iframe src="https://www.facebook.com/plugins/post.php?href=https://www.facebook.com/photo.php?fbid=1160293810731634&set=a.1160293727398309.1073741975.100002530785952&type=3&width=500" width="500" height="521" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe>"][/embed_code_other] | |
// Resulting Facebook post component | |
{ | |
"URL": "https://www.facebook.com/photo.php?fbid=1160293810731634&set=a.1160293727398309.1073741975.100002530785952&type=3", | |
"role": "facebook_post", | |
"layout": "spacerLayout" | |
} | |
// Photos - Second form of photos embed | |
// Works if you take the href query string param, and parse it for the set name (first path part after photos) and fbid (second path part after photos) and put it in the form: | |
// https://www.facebook.com/photo.php?fbid=<fbid>&set=<set> | |
<iframe src="https://www.facebook.com/plugins/post.php?href=https://www.facebook.com/latentximage/photos/a.1746511492041606.1073741838.881745168518247/1746511722041583/?type=3&width=500" width="500" height="336" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe> | |
<iframe src="https://www.facebook.com/plugins/post.php?href=https://www.facebook.com/SeeAustralia/photos/p.10154785558190909/10154785558190909/?type=3&width=500" width="500" height="336" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe> | |
// Resulting Facebook post component | |
{ | |
"URL": "https://www.facebook.com/photo.php?fbid=1746511722041583&set=a.1746511492041606.1073741838.881745168518247&type=3", | |
"role": "facebook_post", | |
"layout": "spacerLayout" | |
} | |
// Video | |
// Works if you take the href query string param and replace /videos/ with /posts/ | |
<iframe src="https://www.facebook.com/plugins/video.php?href=https://www.facebook.com/FrontStreetAnimalShelter/videos/1173634509368670/&show_text=1&width=560" width="560" height="483" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe> | |
// Resulting Facebook post component | |
{ | |
"URL": "https://www.facebook.com/FrontStreetAnimalShelter/posts/1173634509368670/", | |
"role": "facebook_post", | |
"layout": "spacerLayout" | |
} | |
// Permalinks | |
// Don't work. Trying to use the href query string param as the Facebook post component URL. | |
// Have also tried leaving off the id query string param. Neither approach worked. | |
<iframe src="https://www.facebook.com/plugins/post.php?href=https://www.facebook.com/permalink.php?story_fbid=140379329784193&id=100014363808477&width=500" width="500" height="606" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe> | |
<iframe src="https://www.facebook.com/plugins/post.php?href=https://www.facebook.com/permalink.php?story_fbid=140380913117368&id=100014363808477&width=500" width="500" height="589" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe> | |
<iframe src="https://www.facebook.com/plugins/post.php?href=https://www.facebook.com/permalink.php?story_fbid=140516939770432&id=100014363808477&width=500" width="500" height="420" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe> | |
<iframe src="https://www.facebook.com/plugins/post.php?href=https://www.facebook.com/permalink.php?story_fbid=140560073099452&id=100014363808477&width=500" width="500" height="179" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe> | |
<iframe src="https://www.facebook.com/plugins/post.php?href=https://www.facebook.com/permalink.php?story_fbid=140560426432750&id=100014363808477&width=500" width="500" height="151" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment