Sunday, April 3, 2016

How to make my facebook page status visible on my website

Greetings Of the day!!!

I was working on a website. And wanted to include the Updates from my facebook page to the website. I was wondering how to do it. But when I visited the facebook developer console I found the easy solution to do it. Here is the solution how you can include the facebook updates from the facebook page to the website:

The Page plugin lets you easily embed and promote any Facebook Page on your website. Just like on Facebook, your visitors can like and share the Page without leaving your site.

1. You can go to  https://developers.facebook.com/docs/plugins/page-plugin/

2. Enter the details about the facebook page

       

3. After entering all the details. Press on Get Code button:

4. Copy the code popped up after pressing the get code button

 

5. You can paste this code in the HTML file of your website. And you should be able to see the facebook page with like and share button and all the status updates on this page.

You can visit the website: http://drvbhosagoudar-bioresearch.org/  and you can see this stuff at the left side.

That's it. Happy coding.

Friday, April 1, 2016

How to import an SQL file using the command line in MySQL

When I was working with MySql command prompt, I was wondering how to import an available sql file into the available database. 

First you need to open the MySql Command prompt. And select the database. Here "smartcart" is the database. Now I select that database using "use" command as below:

mysql> use smartcart;
Database changed

Now you need know the path of the sql file. Here "items.sql" is the file exported from the other mysql database which I want to import to this "smartcart" database. For that we can use source command.

mysql> source f:/items.sql;
Query OK, 0 rows affected (0.07 sec)

Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.76 sec)

Query OK, 0 rows affected (0.01 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Now you can check that the new table of the sql file is added to the database

mysql> show tables;
+---------------------+
| Tables_in_smartcart |
+---------------------+
| items               |
| users               |
+---------------------+
2 rows in set (0.00 sec)

mysql> select * from items;
Empty set (0.06 sec)

That's it. Happy coding.