Topic: Title and short story on Facebook or twitter

Hello everybody,

I'm going mad with this problem:

I've included cutenews in a page of my website. Anytime i want to share the news on facebook, the preview displayed by facebook is always the same. The page's title and  description. What i want is facebook's preview to display title and description of the post i'm reading on that page in full story mode.
I mean even if i link the full story's page fb will always show title and description of the page containing cutenews.

Is there any way to set cutenews or my webpage to show as preview always title and short story of the post i'm reading?

Hope my problem is clear enough

Thanks
Danilo

Re: Title and short story on Facebook or twitter

I've tried that hack... but i'm not able to work on it. What i need is something similar to that hack. But it has to show title and full or short story of the showed post

Re: Title and short story on Facebook or twitter

heheeh i really don't have any idea about where to start to modify this script. I've tried to put it in the head bot it does not work. Actualy the browser recognize the title of every news but when i share the link on fb, fb shows the title of the intere page:

http://www.eaglesmania.it/news.php?subacti...amp;ucat=6&

Here you can see the page

Re: Title and short story on Facebook or twitter

What i would like is the full story to be shown as a description

Re: Title and short story on Facebook or twitter

I'm trying it, but still doesn't work with me... Apparently i still have twice the title tag... Could you check again my page?


Thanks a   lot for the time you are spending on it...

Re: Title and short story on Facebook or twitter

Fb shows: "News - Eaglesmania" as a title

and this:
CATEGORIE___________________________________Calciomercato_______________________
____________Campionato___________________________________Coppa Italia___________________________________Europa League___________________________________Highlights_____________________________
______Altre notizie__________…


as description

Re: Title and short story on Facebook or twitter

Here is the screenshot
http://i.imgur.com/z06MG.jpg

8 (edited by 2012-01-31 00:01:56)

Re: Title and short story on Facebook or twitter

IT WORKS PERFECTLY!!!

It does not work for the old post, but i don't mind becouse it works on the new ones!

Thanks super super thanks!!!

I have another question,
will this hack make my articles visible also on google?

Re: Title and short story on Facebook or twitter

I've have submitted my website to google, and it is visible, what i cannot find in google are the news i've posted via cutenews... Thats why i say google does not see cutenews. Is there anyting to make my posts appear on google search?

10 (edited by 2012-01-31 09:41:45)

Re: Title and short story on Facebook or twitter

Ok so i'll wait. Thanks again, really, you have been very helpfull. Thanks for your time!

Re: Title and short story on Facebook or twitter

Ok so i'll wait. Thanks again, really, you have been very helpfull. Thanks for your time!

I am sorry but I am trying to do the same thing. Does this all go in the <head> tags?

Re: Title and short story on Facebook or twitter

I am sorry but I am trying to do the same thing. Does this all go in the <head> tags?


Sorry for late reply, yes it goes before </head> tag.

Re: Title and short story on Facebook or twitter

Does this also work with CN 1.5? My title doesn't show up anymore since I installed 1.5

14 (edited by 2012-11-14 10:55:41)

Re: Title and short story on Facebook or twitter

I haven't tried, but for Facebook shares, i'd suggest using the following:

<meta property="og:title" content="" />
<meta property="og:type" content="website" />       
<meta property="og:image" content="" />      
<meta property="og:description" content="" />      
<meta property="og:url" content="" />

15 (edited by 2012-11-14 11:52:12)

Re: Title and short story on Facebook or twitter

No it doesnt work, sorry about that. But I used the following script until now, and as I said, it worked fine up to CN 1.5. I think I have to modify something but I don't know where. Kristoff, you're a great help around here! Thanx for al the help you've given me and other users on he forum.

And as I am copy/pasting I noticed that the old dir 'data' is recplaced with the new 'cdata' folder. As for now, it works again https://cutephp.com/forum/style_emoticons/default/smile.gif Thanx anyhow!

<?PHP
function title_values($id, $use_category)
    {
                $path = './data';//CHANGE PATH TO THE CUTENEWS DATA DIRECTORY HERE
        if ($use_category)
        {
            $cat_lines = file($path.'/category.db.php');
            foreach ($cat_lines as $cat_line)
                {
                    $cat_array = explode('|', $cat_line);
                    $my_cats[$cat_array[0]] = $cat_array[1];
                }
        }

        $news_lines = file($path.'/news.txt');
        foreach ($news_lines as $news_line)
            {
                $news_array = explode("|", $news_line);
                if ($news_array[0] == $id)
                    {
                        $title = strip_tags($news_array[2]);

                        if ($use_category and !empty($news_array[6]))
                            {
                                if (strstr($news_array[6], ','))
                                    {
                                        $cat_array = explode(',', $news_array[6]);
                                        foreach ($cat_array as $category)
                                            $category_arr[] = $my_cats[$category];
                                    }
                                else $category_arr = $my_cats[$news_array[6]];
                            }
                    }
            }
        return array ($title, $category_arr);
    }

if (isset($_GET['id']))
    {
        $title_values = title_values($_GET['id'], true);//change true to false if the category doesn't need to be in the titlebar.
        $title = $title_values[0];
        if (is_array($title_values[1])) $cat = ' - '.implode(' - ', $title_values[1]);
        else $cat = ' - '.$title_values[1];

        echo '<title>'.$title.''.$cat.'</title>';
    }

else echo '<title>kamkrant.nl</title>';
?>

Re: Title and short story on Facebook or twitter

I have a single problem with this hack, in full history categories shown abbreviated know why this happens?

eg

Video is shown as V

Only full story happens in not Short History