Skip to main content

Twitter Custom Share

We can add the tweet button directly from the twitter website.

But if you want a image of you wish, then it's easy to get it.

<a href="http://m.twitter.com/home?status=WHATEVER-YOU-WOULD-LIKE">

<img src="SOME IMAGE, BUT KEEP IT RELEVANT" /></a>

And if you are developing any application and want to implement authentication,

use OAuth provided in twitter API:

https://dev.twitter.com/docs/auth/oauth

Note: You have to register a developer account and create a app there.

For authentication use the access token generated on the app settings page.

Comments

Popular posts from this blog

OS X 10.8 Mountain Lion bootable USB (without MAC)

Download the raw file from here . How to use: 1 - Copy the .raw file to an USB stick using  SUSE Studio Image Writer . If you have error during copy, eject and re-connect the pen drive. When Windows asks if you want to format it, cancel and run Image Writer again. If the problem persists, disable your anti-virus software, it may be blocking raw write to the drive. Another Image Writer for Windows, if SUSE doesn't work https://launchpad.net/win32-image-writer/+download 2 - Boot the USB drive and install. If you need, type  boot options , for example: -v (verbose boot) [default] -x (safe) -s (single user) GraphicsEnabler=yes (enable graphics card drivers) [default] USBBusFix=yes (fix problems with USB devices) npci=0x2000 (use if boot stops at "PCI configuration begin") cpus=1 If you need, use  TransMac  to remove kexts which are causing problems (System/Library/Extensions) and use the flag -f (ignore caches) at boot, or remove /System/Libra...

Java: Use BigInteger in for-loop

In my previous post , I mentioned a way to handle large integers by using BigInteger. Now I'm going to provide a very important usage of it. We often use for-loop. So here is the way to use it: Ordinary integers: for(int i = 1; i <= n; i++) {  //Task to do } BigInteger: for (BigInteger bi = BigInteger.valueOf(1);                 bi.compareTo(n) <= 0;                 bi = bi.add(BigInteger.ONE)) { //Task to do } here n is a BigInteger variable.

Anagram search from a file

// All the words are in the file Dictionary.txt import java.io.*; import java.util.*; public class Anag {     static String[] words;     public static void main(String args[]) throws IOException     {         Hashtable<String, List> ht;         try {             FileInputStream fstream = new FileInputStream("Dictionary.txt");             DataInputStream in = new DataInputStream(fstream);             BufferedReader br = new BufferedReader(new InputStreamReader(in));             List<String> lines = new ArrayList<String>();             String ele;             while ((ele = br.readLine...