Thursday, May 31, 2012

Nine Easy Steps to Get Higher EdgeRank for Your Facebook Posts


Have you noticed how many of your fans your posts are actually reaching to?  Average 5 to 10%.  First you'd be shocked at it, then second, you'd definitely want to get into the EdgeRank.  Do you want to improve your posts to be seen by more people?  Here are easy steps to get started:

1. Increase "Affinity," (relevance of a post) by increasing interactions.  I've written a blog about how to do that here:

2. Increase "Weight," (popularity of a post) by increasing "Like's".  Someone might say # of "Like's"doesn't really matter but content is the king-  Well, at least when it comes to the EdgeRank, # of "Like's" determines the "weight" of a post and it matters (with other factors) to your content's visibility.  I've also written a post on how to increase # of "Likes" on your Facebook page here.


3. Increase "Weight" (popularity of a post) by posting manual posts than app-driven posts.

4. Increase "Weight" (popularity of a post) by varying your post types.  Here is the list: Photo > Video > Links > Status > App-driven post

5. Increase "Time Decay" (recency of a post) factor of EdgeRank by posting fresh contents consistently.

6. Go to Facebook Insights at the end of each day to see and recycle what performed well.

7. Go to Facebook Insights to check your "hides" daily so that you can avoid those posts next time.


8. Reward and encourage high influencers of the week with something valuable.  


9. Target your status updates.  Especially for global entities, certain countries might respond better depending on the contents of a post.  This connects to a bigger marketing principle - clarify the target audience and be in their shoes.  



Hope this helps get you started! "Share" if you liked it.  

Wednesday, May 30, 2012

Six Easy Steps to Lead Your Community on Facebook Page



You might have come across with a Facebook page with 10,000+ fans that doesn’t get as much # of Talking About or # of engagement.  For sure, you can’t be all things to all fans.  But here are a few simple steps of how you can get started in seeding to your fan base.


1. “Friend” new fans from your page and say "Thank You".  Feel free to ask simple questions like how they found the page, their interest, and what they’d like to hear from your page.  I'd recommend to "like" not only those who "liked" your page, but also the ones who "liked" or "shared" your posts.


2. If you are posting a photo on your wall, you can tag fans to give them heads-up. (You should be careful through, trying not to tag recklessly or without relevant information).


3. Engage in your target community, interact, and offer valuable feedbacks.


4. Set up a content strategy.  Let's say you divided up your contents into Top Ten categories.  Create a content storeroom per each category where you can draw from and rotate the contents from.  This will help you to post with consistency.


5. Give value.  Imagine you give a gift to someone who is important to you.  You would think about how to word it, how to wrap it, how to deliver it, and most importantly - the value.  Not for the giver, but for the recipient.

6. Invite friends.  Look out for a few active supporters of your page and ask them to become an "ambassador" of your page.  Continue interacting with them and reach out to their friends network. 

"Share" and "comment" if this was helpful! 

Tuesday, May 29, 2012

YII Adding a parameter to the Action

This is for security and better control of your website.

If you are adding a parameter to your action and you are using that parameter to get data from the database, make sure you throw error page when there is no data from the database.

In config/main.php - for managing URL with alias
'components'=>array(
      ...
      'urlManager' => array(
           'post/<alias>' => 'post/page',
));
URL 
http://www.example.com/post/alias_name_here
Controller
<?php
class PostController extends Controller {
       ...
       public function actionPage($alias) {
             echo $alias;
             /* Using $alias to get data */
            $alias_data = Post::model()->find(array(
                'condition'=>"active='Y' AND alias='".$alias."'",
                'order'=>'id DESC',
                'select'=>'title, content',
                'limit'=>1,
            ));
           if (is_object($alias_data)) {
                 /* Display alias_data */
                 ...
           } else
                 /* Through error page when there is no data */
                 throw new CHttpException(404,'The specified page cannot be found.');
           }
      }
}

Yii Deployment

Yii directory paths
1. Move runtime out of protected folder to out of webroot
2. Move framework out of webroot
3. Move an application out of webroot

Then, modify index.php

// change the following paths if necessary
$yii=dirname(__FILE__).'/../../framework/yii.php';
$config=dirname(__FILE__).'/../../protected/config/main.php';

and add runtime in /protected/config/main.php

return array(
      'runtimePath' => Yii::getPathOfAlias('system') . '/../runtime/', 
      ...
);

Setting custom layout for 404 error page in YII Framework

If you want to set a custom layout for 404 error page in YII Framework, you can do the following:

1. Modify config/main.php
'components'=>array(
...
        'errorHandler'=>array(
            'errorAction' => 'site/error'
        ),
...
),
The site/error is where the error page resides.  It is in the views/site/error.php page.  In order for the pages in views/site/ to show, it needs the controller, and SiteController located in /controllers/SiteController.php.  

controllers/SiteController.php
    public function actionError()
    {
        $error = Yii::app()->errorHandler->error;

        if( $error )
        {
            $this -> render( 'error', array( 'error' => $error ) );
        }
    }

If you do not want to use the site controller, you can create a new view and controller folder.  For example, you can create views/general/error.php and controllers/GeneralController.php and modify 'errorAction' => 'general/error'.  


controllers/GeneralController.php

<?php 
 class GeneralController extends Controller {
    public $layout='main_general';  //layout goes here    public function actionError()
    {
        $error = Yii::app()->errorHandler->error;

        if( $error )
        {
            $this -> render( 'error', array( 'error' => $error ) );
        }
    }   ?>
the main_general should be located in either WebRoot/themes/ThemeName
As indicated in the link here http://www.yiiframework.com/doc/guide/1.1/en/topics.error
'main_general' (layout) is either located in 3 location.  
It is either 
1. in your main theme view folder /WebRoot/themes/ThemeName/views/main_general.php
2. in the WebRoot/protected/views/main_general.php (default)
3. in yii/framework/views - the standard system view directory provided by the Yii framework.


views/site/error.php or views/general/error.php
<div class="errorSummary">
    <p>
    Sorry, it seems like a(n) <?= $error['code']; ?> error has occured during your request.
    </p>

    <p><strong>Message:</strong> <?= $error['message']; ?></p>
</div>