Wednesday, November 6, 2013

Facebook Like button show on your webSite

1. The following snippet of code will give the basic version of the SDK where the options are set to their most common defaults. You should insert it directly after the opening <body> tag on each page you want to load it:


<script>
  window.fbAsyncInit = function() {
    FB.init({
      appId      : 'FBAPPID',
      xfbml      : true,
      version    : 'v2.8'
    });
  };

  (function(d, s, id){
     var js, fjs = d.getElementsByTagName(s)[0];
     if (d.getElementById(id)) {return;}
     js = d.createElement(s); js.id = id;
     js.src = "//connect.facebook.net/en_US/sdk.js";
     fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));
</script>
2. Add this code in your page where you want to show the like button

<div class="fb-like" data-href="https://www.facebook.com/wasam.arts" data-width="200" data-layout="standard" data-action="like" data-size="large" data-show-faces="true" data-share="true"></div>




Hope this helps.

Monday, November 4, 2013

How to add Custom font in Titanium also Bangla Support in android

This is the Easy way To add custom font  or support Bangla in your android apps in titanium.

At first create a folder named fonts in resource directory then past here your custom font. you can get it

And call this font in a font property where you want like this code.

var customFont = 'Spicy Rice'; // use the friendly-name on iOS
if(Ti.Platform.osname=='android') {
   // on Android, use the "base name" of the file (name without extension)
   customFont = 'SpicyRice-Regular';
} 

var label1 = Titanium.UI.createLabel({
   color:'#000',
   text:'I am Window 1',
   font:{
      fontSize:40,
      fontFamily: customFont
   },
   textAlign:'center',
   width:'auto'
});


You can follow this link Custom_Fonts to know more.
Thanks



Friday, November 1, 2013

Path problem solution on titanium studio for Windows 7

Three basic Most Important path in environment variable to run titanium studio in Windows PC for android and the location is
MyComputer>properties>Advanced system Setting>Environment Variable>SysteVariable
and everything you set system Variable path
1. JDK path
2.Node Path
3. Build in  Path
  •  Path number one i have already answered This Link
  • And path Number Three that is build in  when you setup win7 that is automatically generated in environment variable path into System variable
All Windows systems must have the following paths at the beginning of their PATH environment variable to function properly:%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0
And if you delete this your titanium studio don't built any project successfully
So be careful don't delete that 
  • And node path it also automatically generated when node.js is installed sometimes it not do that so you should know that how to set node path in system variable
variable name= path
variable Value=C:\Program Files (x86)\nodejs

you don't delete before set the value of path or don't create new path, you just editing the remaining path and set every value after semicolon.
You Can also show android SDK path
1. tools path=D:\android-sdk\tools;(you PC SDK location)
2. platform tools path=D:\android-sdk\platform-tools(you PC SDK location)


Thanks  



Thursday, October 31, 2013

How to set JDK path in environment variable


At first right click my computer and select properties

1. Click the Advanced System Setting Tab
2. Click the Environment variables button
3. Under system variables click new..
4. Enter the variable name as JAVA_HOME. Then set the value C:\Program Files (x86)\Java\jdk1.8.0_31
 (note: this is your computer jdk path)

Now Select path in system Variable
  •  Click the edit button Then add the value at the end after semicolon C:\ Program Files (x86)\Java\jdk1.8.0_31\bin  (Note: Do NOT delete any value of this path variable)
  •  Click OK.
  •  click Apply Changes.

 You might need to restart windows.
 I think JDK problem would not show again. Now you
can run your project.

Thanks