omit / linkedin-j

Automatically exported from code.google.com/p/linkedin-j
0 stars 0 forks source link

How to specify the consumer key and secret on command line as program arguments. #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Nabeel,

I am testing OAuthAuthenticationExample, the program only executes
printHelp(options). I don't change anything in the code. I don't know how
to specify the consumer key and secret on command line as program
arguments. Could you please show me how to do that?

Also, I already included the jar file from dev-lib, dist, jaxb-lib, lib
folders to my classpath. Do i still miss any jar files?

Thanks in advance,
Quyen

Original issue reported on code.google.com by thucquye...@gmail.com on 14 Dec 2009 at 10:00

GoogleCodeExporter commented 9 years ago
If you are running it in command prompt: use this syntax (replace your consumer 
key
and secret)

java com.google.code.linkedinapi.client.examples.OAuthAuthenticationExample
-consumerKey TdA4ZuoRgD46-vh8kFF9l0xcs5W3ODBaGdto1OdLv9ujfZiKpq4_KBfT7j-xxxxx
-consumerSecret biSbgqH0hSzCvDMDsQyA21AOapiLzUS8Ka11QDraqVGj8kFZJEY1FrqUqYdxxxx

If you are running it in eclipse: Go to Run configuration - Arguments and in the
Program arguments specify: (replace your consumer key and secret)
-consumerKey TdA4ZuoRgD46-vh8kFF9l0xcs5W3ODBaGdto1OdLv9ujfZiKpq4_KBfT7j-xxxxx
-consumerSecret biSbgqH0hSzCvDMDsQyA21AOapiLzUS8Ka11QDraqVGj8kFZJEY1FrqUqYxxxxx

Hope that helps.

Regards
Nabeel Mukhtar

Original comment by nabeelmukhtar on 15 Dec 2009 at 5:28