opengraph

php redirect url with og metatag (open graph)

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 05:16:05
问题 I have server side redirect page in PHP redirect.php this page redirects the user with PHP header() function: header( 'location: mypage.html?test' ); Is there a way to add some OG meta tags (Open Graph) in a way that when someone shares the redirect.php page on Facebook and similar websites, these properties would be applied? <meta property="og:title" content="Facebook should load this when shared redirect.php"/> 回答1: Since redirect.php redirects whenever it's accessed or/& executed it would

Do services other than Facebook use Open Graph?

倖福魔咒の 提交于 2019-11-27 22:42:33
Will other services other than Facebook use Open Graph tags when scraping the page for sharing information? Meaning, if I have an AddThis button (for example) on a page, which allows sharing to Facebook, Google+, and Pinterest etc., will any of the other services also honor those meta tags? Or is generally something we do specifically for Facebook? JasonStoltz The answer appears to be yes... sort of. Since Open Graph is an open protocol of sorts, it's not meant to be Facebook specific. And it appears that while not all vendors may respect the tags yet, most do. Take Pinterest for example. If

Facebook Open Graph Error - Inferred Property

我怕爱的太早我们不能终老 提交于 2019-11-27 18:58:28
I'm trying to implement Facebook's OpenGRaph protocol on my product pages. On each page i have this above the head section: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml"> Then within the head section i have: <meta property="og:title" content="This Page Title"/> <meta property="og:type" content="product"/> <meta property="og:url" content="http://www.mywebaddress.com"/> <meta property="og:image" content="http://www.myimage.jpg"/> <meta property="og:site_name" content="My Site Name"/> <meta property="fb:admins" content=

Facebook Share Story Image Does Not Appear For First time

☆樱花仙子☆ 提交于 2019-11-27 16:23:36
I try to share the article or web page but the story does not show the image when sharing for the first time but when i share for the next time, image is coming. Checked in FB Debugger Also, same result.image not coming for the first time , next time it is coming. <html class="no-js" lang="ar" dir="rtl" data-ng-app="mApp" xmlns:fb="http://ogp.me/ns/fb#"> <meta property="og:title" content="mytitle"/> <meta property="og:url" content="http://mytest.com"/> <meta property="og:image" content="http://mytest.com/1-773128.jpg"/> <meta property="og:description" content="ffff2024"/> <meta property="og

Facebook api: (#4) Application request limit reached

柔情痞子 提交于 2019-11-27 12:19:25
Since late November we are hitting the application limit on the Facebook API. We are fetching user's photos, and selected 25 friends photos → this is done when a user signatures in (we are building albums for the users). The above action is limited, but it was not limited till end of November. We are using batch calls to get photos from albums - is there a better way to get this info without being limited? BTW, according to Facebook we are doing 1M calls per day, but according to our count we are doing 180K calls per day. Fetching only the user's photos without his friend's photos is not a

Why does Facebook Graph API say my account is non-active?

纵饮孤独 提交于 2019-11-27 11:54:01
We have some code that uses Facebook Open Graph API to display some posts on our home page. It was originally developed by a previous developer and I rewrote it in ASP.NET MVC for our home page (where before it was PHP which I believe was loaded in an iframe). At that time, I used the app ID and secret that were left to me. This has functioned fine for a couple of years. This afternoon, we started getting an error back on our site: "Access to this data is temporarily disabled for non-active accounts due to changes we are making to the Facebook Platform". No sweat. I figured I just needed to

“Unsafe JavaScript attempt to access frame with URL…” error being continuously generated in Chrome webkit inspector

隐身守侯 提交于 2019-11-27 10:53:59
Chrome (or any other webkit browser) throws a ton of these "Unsafe JavaScript attempt to access frame with URL..." when working with the Facebook API for example. It doesn't interfere with actual operation, but it does make the javascript console basically unusable. I'd like to know if there is a way to suppress these errors specifically in the console? Or if there are other solutions you guys can think of, I would really appreciate it. Thanks. You could allow cross-domain requests during testing by running chrome with the --disable-web-security command line option. This should probably get

Open Graph namespace declaration: HTML with XMLNS or head prefix?

余生长醉 提交于 2019-11-27 10:03:27
I have seen conflicting information on how to best implement Open Graph namespaces. Specifically, the Open Graph website uses a few different methods, and the Facebook Open Graph examples use other methods. Open Graph website example (using HTML prefix attribute): <html prefix="og: http://ogp.me/ns#"> Open Graph website source code (using HTML XMLNS attribute): <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#"> Facebook Open Graph documentation (using HEAD prefix attribute): <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#"> Facebook Open Graph documentation

Open graph og:video Meta Tags content

心不动则不痛 提交于 2019-11-27 09:51:56
问题 I'm trying to set up a page which can be properly scraped by Facebook when it's shared/liked. The page will have a YouTube video associated with it, so in the content attribute of the og:video tag, should I put the YouTube video embed link or the actual youtube page link for it to appear on Facebook with the little "Preview" button that plays the video in Facebook? Hope someone can help! Thanks! 回答1: You have two options. You can either set the og:video to https://www.youtube.com/v

Get Facebook meta tags with PHP

我只是一个虾纸丫 提交于 2019-11-27 09:10:45
I'm trying to get Facebook's meta tags from my HTML. I'm using simple html dom to get all html data from the site. I've tried with preg_replace, but without luck. I want for example to get the content of this fb meta tag: <meta content="IMAGE URL" property="og:image" /> Hope someone can help! :-) I Was going to suggest to use get_meta_tags() but it seems to not work (for me) :s <?php $tags = get_meta_tags('http://www.example.com/'); echo $tags['og:image']; ?> But I would rather suggest using DOMDocument anyways: <?php $sites_html = file_get_contents('http://example.com'); $html = new