Fred Gorski
Fred Gorski

Reputation: 9

Posts from wordpress to facebook page

I think I might be doing something wrong. But, first, I was posting from my WordPress to my Facebook page with the new Facebook plugin. Things didn’t go very well though: no text excerpt sometimes didn't show featured image. So I disabled it from plugin, and used the API. It is posting, but now the excerpt comes with html tags, e.g.:

<p> this is a blog post</p>
<p> <em> this is the post content</em> </p>

Why is that so?

Upvotes: 0

Views: 165

Answers (1)

C3roe
C3roe

Reputation: 96306

Why is that so?

Because you are sending HTML code to Facebook …?

Strip the HTML code out, and just send the raw text. You can try and use strip_tags for that – if your HTML code is well-formed, then it should work fine. (If it’s not, though, it might strip to much.)

Upvotes: 1

Related Questions