www.webdeveloper.com
Results 1 to 3 of 3

Thread: Facebook Meta Tag - og:description for database value with strip_tags() and substr()

  1. #1
    Join Date
    May 2013
    Posts
    4

    Facebook Meta Tag - og:description for database value with strip_tags() and substr()

    Facebook Meta Tag - og:description for database value with strip_tags() and substr()

    HTML Code:
    [PHP][CODE]$descpp = substr($fetchForumData[0]['descp'], 0, 300)."...";
    // echo $descrp    {As it shows correctly as the description data from database limit to 300 words via echo}
    <meta property="og:description" content="<?php echo strip_tags($descpp); ?>" />  [/CODE][/PHP]
    The following script not working and shows result on facebook as '....' rather than '$descpp + .....'

    And I already debug via http://developers.fa...com/tools/debug also.

    And for
    HTML Code:
    [PHP][CODE]<meta property="og:description" content="<?php echo $fetchForumData[0]['descp']; ?>" />[/CODE][/PHP]
    ... its shows complete content on the top of the article page and after comment via facebook comment plugin it shows blank space on facebook timeline.

    What is missing? Kindly advice as soon as possible.

  2. #2
    Join Date
    May 2013
    Posts
    4
    Any Help?
    Is this anything wrong with the code?
    Or Any solution?

    Thanks in Advance

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,384
    So it sounds like you need to do some debugging to find out if $fetchForumData[0]['descp'] actually has any data at that point in the code, and if not, got back to where it gets set and find out why it's empty (after first making sure you're using the correct variable name and array keys).
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles