Facebook偵錯時出現「php echo $post->post_title」的錯誤
WordPress 文章發表後,通常我們會到Facebook進行偵錯抓取文章資訊,好讓網友在社群分享能顯示我們要的標題、圖片、內容預覽畫面。但今天在 Debug時,突然出現未提供類型 string 的必要屬性 ‘og:title’ php echo $post->post_title錯誤,試試看以下的方法,看看是否能幫你解決這個問題,如果還是無效就晚點再試試看,畢竟臉書有時候也是常當機..
點此前往:FB Debug工具
解決方法
前往佈景主題的header.php<head></head>底下加入 <meta property=”og:title” content=”<?php echo $post->post_title; ?>”/> 自動抓取WordPress的每篇文章標題。
步驟二:
問題依舊
php echo $post->post_title php echo $post->post_title php echo $post->post_title php echo $post->post_title
php echo $post->post_title php echo $post->post_title php echo $post->post_title php echo $post->post_title
php echo $post->post_title php echo $post->post_title php echo $post->post_title php echo $post->post_title
php echo $post->post_title php echo $post->post_title php echo $post->post_title php echo $post->post_title
php echo $post->post_title php echo $post->post_title php echo $post->post_title php echo $post->post_title
php echo $post->post_title php echo $post->post_title php echo $post->post_title php echo $post->post_title
SETUP WIZARD (EASY TO FOLLOW)
CLEAN, & SIMPLE USER INTERFACE
GOOGLE WEBMASTER CENTRAL INTEGRATION
KEYWORD COMPARISON & GOOGLE TRENDS TOOL
GOOGLE CRAWL ERRORS
CONTEXTUAL HELP (TOOLTIPS, NOTICES, HELP TABS, ETC)
AUTOMATED IMAGE SEO
XML SITEMAP
RICH SNIPPET SUPPORT
ARTICLE RICH SNIPPET
PRODUCT RICH SNIPPET
RECIPE RICH SNIPPET
EVENTS RICH SNIPPET
VIDEO RICH SNIPPET
LOCAL BUSINESS RICH SNIPPET
NEWS SITEMAP FOR SUBMITTING WEBSITES ON GOOGLE NEWS
VIDEO SITEMAP FOR VIDEO WEBSITES
PING SEARCH ENGINES
EXCELLENT CODE QUALITY
SEO ANALYSIS TOOL BASED ON 40 FACTORS
This Spec. is the other purpose for this article. Math Rank SEO has it’s own way to evaluate SEO score.
LOCAL SEO OPTIMIZATION
CUSTOMIZE SEO FOR SINGLE ITEMS
SHORTCODE FOR DISPLAYING CONTACT INFORMATION
LINK BUILDER – VERY HANDY FOR INTERNAL LINKING
ADVANCED REDIRECTION MANAGER
HIGHLY CUSTOMIZABLE BREADCRUMBS
DISPLAY BREADCRUMBS IN THEMES AUTOMATICALLY
404 MONITOR – SIMPLE & ADVANCED
REDIRECT ATTACHMENTS TO THEIR PARENT POSTS, PAGES OR CUSTOM POST TYPES
FACEBOOK AUTOMATIC OPEN GRAPH
YOAST FREE & PREMIUM ADVANCED OPTIONS IMPORTER
ADD ICON OVERLAY TO THUMBNAIL FOR FB, TWITTER & G+
ALL IN ONE SEO ADVANCED OPTIONS IMPORTER
GOOGLE, BING, ALEXA, YANDEX & PINTEREST VERIFICATION TOOL
DEFAULT SHARE IMAGE
TWITTER META CARDS
COMPATIBILITY CHECK
FOCUS KEYWORD AND CONTENT ANALYSIS
CONTROL THE TITLE & META DESCRIPTION OF ALL POSTS, PAGES OR CUSTOM POST TYPES
GET FOUND BY ALL SEARCH ENGINES AND SOCIAL MEDIA SITES
CONTROL ROBOTS META ON ALL POSTS, PAGES OR CUSTOM POST TYPES
ADD KNOWLEDGE GRAPH META DATA
BULK EDIT TITLES & DESCRIPTIONS OF ALL YOUR CONTENT
COMPATIBILITY WITH WOOCOMMERCE
COMPATIBILITY WITH EASY DIGITAL DOWNLOADS
FACEBOOK AUTHORSHIP
CHOOSE YOUR SEPARATOR CHARACTER
SOCIAL MEDIA ACCOUNT INTEGRATION
CHOOSE A PRIMARY CATEGORY
SOCIAL PREVIEWS
DEFAULT OPENGRAPH THUMBNAIL
POST PREVIEW ON GOOGLE
MODIFY GLOBAL META
24X7X365 SUPPORT
OPTIMIZE AUTHOR PROFILES BY ENABLING SEO META BOX FOR USERS
.HTACCESS EDITOR
IMPORT/EXPORT SETTINGS WITH A SINGLE CLICK
ROBOTS.TXT EDITOR
STRIP CATEGORY BASE
RSS OPTIMIZATION
OPTIMIZE CATEGORY ARCHIVES BY ENABLING SEO META BOX FOR CATEGORIES
REMOVE STOPWORDS
DETAILED DOCUMENTATION
WONDERFUL CONTENT MADE YOUR WEBSITE
One Two Buckle My Shoes
One, two, buckle my shoe
Three, four, Shut the door
Five, six, Seven, eight,
Nine, ten, Let’s go play
—
Goodbye to You
Goodbye to you, goodbye to you
Goodbye my dear friend
I’ll see you again
—
Who’s Afraid of the Big Bad Wolf
Who’s afraid of the big bad wolf
Big bad wolf
Big bad wolf
Who’s afraid of the big bad wolf
Tra la la la la
—
How Much is that Doggie?
How much is that doggie in the window? *(arf! Arf!)*
The one with the waggley tail
How much is that doggie in the window? *(arf! Arf!)*
I do hope that doggie’s for sale
—
Two Little Eyes
Two little eyes that open and close
two little ears and one little nose
Two tittle checks and one little chin
two little lips with the teeth close in
—
ABC’s Song
A B C D E F G
H I J K L M N O P
Q R S and T U V
W and X Y Z
Happy, happy, shall we be
When we learn our ABC’s
—
Fly Bird Fly
Fly birdie fly
Fly birdie fly
Fly birdie fly
Up up to the sky
La-La-La-La-La-La-La-La-La-La-La-La
—
Twinkle, Twinkle, Little Star
Twinkle, twinkle, little star, How I wonder what you are
Up above the world so high, Like a diamond in the sky.
Twinkle, twinkle, little star, How I wonder what you are!
—
Round the Mulberry Bush
Here we go round the mulberry bush,
The mulberry bush, The mulberry bush.
Here we go round the mulberry bush
so early in the morning.
—
Math Rank SEO TEST:
One Two Buckle My Shoes
One, two, buckle my shoe
Three, four, Shut the door
Five, six, Seven, eight,
Nine, ten, Let’s go play
—
Goodbye to You
Goodbye to you, goodbye to you
Goodbye my dear friend
I’ll see you again
—
Who’s Afraid of the Big Bad Wolf
Who’s afraid of the big bad wolf
Big bad wolf
Big bad wolf
Who’s afraid of the big bad wolf
Tra la la la la
—
How Much is that Doggie?
How much is that doggie in the window? *(arf! Arf!)*
The one with the waggley tail
How much is that doggie in the window? *(arf! Arf!)*
I do hope that doggie’s for sale
—
Two Little Eyes
Two little eyes that open and close
two little ears and one little nose
Two tittle checks and one little chin
two little lips with the teeth close in
—
ABC’s Song
A B C D E F G
H I J K L M N O P
Q R S and T U V
W and X Y Z
Happy, happy, shall we be
When we learn our ABC’s
—
Fly Bird Fly
Fly birdie fly
Fly birdie fly
Fly birdie fly
Up up to the sky
La-La-La-La-La-La-La-La-La-La-La-La
—
Twinkle, Twinkle, Little Star
Twinkle, twinkle, little star, How I wonder what you are
Up above the world so high, Like a diamond in the sky.
Twinkle, twinkle, little star, How I wonder what you are!
—
Round the Mulberry Bush
Here we go round the mulberry bush,
The mulberry bush, The mulberry bush.
Here we go round the mulberry bush
so early in the morning.
—
SING MORE SONGS AND POST FAKE ARTICLES
London Bridge is falling down
London Bridge is falling down,
Falling down, falling down.
London Bridge is falling down,
My fair lady!
Build it up with iron bars,
Iron bars, iron bars,
Build it up with iron bars,
My fair lady!
Iron bars will bend and break,
Bend and break, bend and break.
Iron bars will bend and break,
My fair lady!
—
Ten Little Indians
One little, two little, three little Indians, Four little, five little, six little Indians,
Seven little, eight little, nine little Indians. Ten little Indian boys.
—
Days of the Week
Sunday, la- la – la Monday, la-la-la Tuesday, la-la-la Wednesday~
Thursday, la-la-la Friday, la-la-la Saturday. That makes a week.
—
—
Goodbye to You
Goodbye to you, goodbye to you
Goodbye my dear friend
I’ll see you again
—
Who’s Afraid of the Big Bad Wolf
Who’s afraid of the big bad wolf
Big bad wolf
Big bad wolf
Who’s afraid of the big bad wolf
Tra la la la la
—
How Much is that Doggie?
How much is that doggie in the window? *(arf! Arf!)*
The one with the waggley tail
How much is that doggie in the window? *(arf! Arf!)*
I do hope that doggie’s for sale
—
Two Little Eyes
Two little eyes that open and close
two little ears and one little nose
Two tittle checks and one little chin
two little lips with the teeth close in
—
ABC’s Song
A B C D E F G
H I J K L M N O P
Q R S and T U V
W and X Y Z
Happy, happy, shall we be
When we learn our ABC’s
—
Fly Bird Fly
Fly birdie fly
Fly birdie fly
Fly birdie fly
Up up to the sky
La-La-La-La-La-La-La-La-La-La-La-La
—
Twinkle, Twinkle, Little Star
Twinkle, twinkle, little star, How I wonder what you are
Up above the world so high, Like a diamond in the sky.
Twinkle, twinkle, little star, How I wonder what you are!
—
Round the Mulberry Bush
Here we go round the mulberry bush,
The mulberry bush, The mulberry bush.
Here we go round the mulberry bush
so early in the morning.
—
Math Rank SEO TEST:
One Two Buckle My Shoes
One, two, buckle my shoe
Three, four, Shut the door
Five, six, Seven, eight,
Nine, ten, Let’s go play
—
Goodbye to You
Goodbye to you, goodbye to you
Goodbye my dear friend
I’ll see you again
—
Who’s Afraid of the Big Bad Wolf
Who’s afraid of the big bad wolf
Big bad wolf
Big bad wolf
Who’s afraid of the big bad wolf
Tra la la la la
—
How Much is that Doggie?
How much is that doggie in the window? *(arf! Arf!)*
The one with the waggley tail
How much is that doggie in the window? *(arf! Arf!)*
I do hope that doggie’s for sale
—
Two Little Eyes
Two little eyes that open and close
two little ears and one little nose
Two tittle checks and one little chin
two little lips with the teeth close in
—
ABC’s Song
A B C D E F G
H I J K L M N O P
Q R S and T U V
W and X Y Z
Happy, happy, shall we be
When we learn our ABC’s
—
Fly Bird Fly
Fly birdie fly
Fly birdie fly
Fly birdie fly
Up up to the sky
La-La-La-La-La-La-La-La-La-La-La-La
—
Twinkle, Twinkle, Little Star
Twinkle, twinkle, little star, How I wonder what you are
Up above the world so high, Like a diamond in the sky.
Twinkle, twinkle, little star, How I wonder what you are!
—
Round the Mulberry Bush
Here we go round the mulberry bush,
The mulberry bush, The mulberry bush.
Here we go round the mulberry bush
so early in the morning.
—
SING MORE SONGS AND POST FAKE ARTICLES
London Bridge is falling down
London Bridge is falling down,
Falling down, falling down.
London Bridge is falling down,
My fair lady!
Build it up with iron bars,
Iron bars, iron bars,
Build it up with iron bars,
My fair lady!
Iron bars will bend and break,
Bend and break, bend and break.
Iron bars will bend and break,
My fair lady!
—
Ten Little Indians
One little, two little, three little Indians, Four little, five little, six little Indians,
Seven little, eight little, nine little Indians. Ten little Indian boys.
—
Days of the Week
Sunday, la- la – la Monday, la-la-la Tuesday, la-la-la Wednesday~
Thursday, la-la-la Friday, la-la-la Saturday. That makes a week.
—
—
Goodbye to You
Goodbye to you, goodbye to you
Goodbye my dear friend
I’ll see you again
—
Who’s Afraid of the Big Bad Wolf
Who’s afraid of the big bad wolf
Big bad wolf
Big bad wolf
Who’s afraid of the big bad wolf
Tra la la la la
—
How Much is that Doggie?
How much is that doggie in the window? *(arf! Arf!)*
The one with the waggley tail
How much is that doggie in the window? *(arf! Arf!)*
I do hope that doggie’s for sale
—
Two Little Eyes
Two little eyes that open and close
two little ears and one little nose
Two tittle checks and one little chin
two little lips with the teeth close in
—
ABC’s Song
A B C D E F G
H I J K L M N O P
Q R S and T U V
W and X Y Z
Happy, happy, shall we be
When we learn our ABC’s
—
Fly Bird Fly
Fly birdie fly
Fly birdie fly
Fly birdie fly
Up up to the sky
La-La-La-La-La-La-La-La-La-La-La-La
—
Twinkle, Twinkle, Little Star
Twinkle, twinkle, little star, How I wonder what you are
Up above the world so high, Like a diamond in the sky.
Twinkle, twinkle, little star, How I wonder what you are!
—
Round the Mulberry Bush
Here we go round the mulberry bush,
The mulberry bush, The mulberry bush.
Here we go round the mulberry bush
so early in the morning.
—
Math Rank SEO TEST:
One Two Buckle My Shoes
One, two, buckle my shoe
Three, four, Shut the door
Five, six, Seven, eight,
Nine, ten, Let’s go play
—
Goodbye to You
Goodbye to you, goodbye to you
Goodbye my dear friend
I’ll see you again
—
Who’s Afraid of the Big Bad Wolf
Who’s afraid of the big bad wolf
Big bad wolf
Big bad wolf
Who’s afraid of the big bad wolf
Tra la la la la
—
How Much is that Doggie?
How much is that doggie in the window? *(arf! Arf!)*
The one with the waggley tail
How much is that doggie in the window? *(arf! Arf!)*
I do hope that doggie’s for sale
—
Two Little Eyes
Two little eyes that open and close
two little ears and one little nose
Two tittle checks and one little chin
two little lips with the teeth close in
—
ABC’s Song
A B C D E F G
H I J K L M N O P
Q R S and T U V
W and X Y Z
Happy, happy, shall we be
When we learn our ABC’s
—
Fly Bird Fly
Fly birdie fly
Fly birdie fly
Fly birdie fly
Up up to the sky
La-La-La-La-La-La-La-La-La-La-La-La
—
Twinkle, Twinkle, Little Star
Twinkle, twinkle, little star, How I wonder what you are
Up above the world so high, Like a diamond in the sky.
Twinkle, twinkle, little star, How I wonder what you are!
—
Round the Mulberry Bush
Here we go round the mulberry bush,
The mulberry bush, The mulberry bush.
Here we go round the mulberry bush
so early in the morning.
—
SING MORE SONGS AND POST FAKE ARTICLES
London Bridge is falling down
London Bridge is falling down,
Falling down, falling down.
London Bridge is falling down,
My fair lady!
Build it up with iron bars,
Iron bars, iron bars,
Build it up with iron bars,
My fair lady!
Iron bars will bend and break,
Bend and break, bend and break.
Iron bars will bend and break,
My fair lady!
—
Ten Little Indians
One little, two little, three little Indians, Four little, five little, six little Indians,
Seven little, eight little, nine little Indians. Ten little Indian boys.
—
Days of the Week
Sunday, la- la – la Monday, la-la-la Tuesday, la-la-la Wednesday~
Thursday, la-la-la Friday, la-la-la Saturday. That makes a week.
—
—
How Much is that Doggie?
How much is that doggie in the window? *(arf! Arf!)*
The one with the waggley tail
How much is that doggie in the window? *(arf! Arf!)*
I do hope that doggie’s for sale
—
Two Little Eyes
Two little eyes that open and close
two little ears and one little nose
Two tittle checks and one little chin
two little lips with the teeth close in
—
ABC’s Song
A B C D E F G
H I J K L M N O P
Q R S and T U V
W and X Y Z
Happy, happy, shall we be
When we learn our ABC’s
—
Fly Bird Fly
Fly birdie fly
Fly birdie fly
Fly birdie fly
Up up to the sky
La-La-La-La-La-La-La-La-La-La-La-La
—
Twinkle, Twinkle, Little Star
Twinkle, twinkle, little star, How I wonder what you are
Up above the world so high, Like a diamond in the sky.
Twinkle, twinkle, little star, How I wonder what you are!
—
Round the Mulberry Bush
Here we go round the mulberry bush,
The mulberry bush, The mulberry bush.
Here we go round the mulberry bush
so early in the morning.
—
SING MORE SONGS AND POST FAKE ARTICLES
London Bridge is falling down
London Bridge is falling down,
Falling down, falling down.
London Bridge is falling down,
My fair lady!
Build it up with iron bars,
Iron bars, iron bars,
Build it up with iron bars,
My fair lady!
Iron bars will bend and break,
Bend and break, bend and break.
Iron bars will bend and break,
My fair lady!
—
Ten Little Indians
One little, two little, three little Indians, Four little, five little, six little Indians,
Seven little, eight little, nine little Indians. Ten little Indian boys.
—
Days of the Week
Sunday, la- la – la Monday, la-la-la Tuesday, la-la-la Wednesday~
Thursday, la-la-la Friday, la-la-la Saturday. That makes a week.
—