Do you have
<uses-permission
android:name="android.permission.INTERNET" /> in AndroidMainfest.xml ?
On Sunday, March 11, 2012 9:08:31 PM UTC-4, AndroidGirl8 wrote:
>
> Hello,
> I'm trying to use sociallib http://www.androidlibs.com/ in my new app i
> downloaded all jars needed and tried to use this code from here
> http://code.google.com/p/sociallib/wiki/SocialLibGuide
>
> public class Test extends Activity {
>
> private static final String CONS_KEY = "PutYourKeyHere";
> private static final String CONS_SEC = "PutYourSecretHere";
> private static final String CALLBACK = "testapp://linkedin";
> private static LinkedInConnector linkedIn;
>
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
>
> Uri uri = this.getIntent().getData();
> if (uri != null && uri.toString().startsWith(CALLBACK)) {
> returningFromWebPage();
> } else {
> firstTimeHere();
> }
> }
>
> private void firstTimeHere() {
> linkedIn =
> SocialNetworkHelper.createLinkedInConnector(CONS_KEY,
> CONS_SEC, CALLBACK);
> linkedIn.requestAuthorization(this);
> // After this line of code, the user will be redirected to a web page
> to enter his credentials
> }
>
> private void returningFromWebPage() {
> // We are returning to the activity, the user has enterd his
> credentials
> // already, so we can authorize the application
> linkedIn.authorize(this);
>
> List<LinkedInPost> list;
>
> try {
> list = linkedIn.getWallPosts(); // We create a list
> containing the user's wall posts
> linkedIn.comment(list.get(0),
> "Just a comment on the first Wall
> post"); // We post a comment on the first post
>
> } catch (NotAuthentifiedException e) {
> Log.e("Sample", "The user is not logged in");
> } catch (Exception e) {
> Log.e("Sample", e.getMessage());
> }
> }
> }
>
>
>
>
>
>
>
> and getting this exception
>
> java.net.UnknownHostException: api.linkedin.com
>
> i don't know if i missing something but i'm new in using social media
> ,Please i need help !
>
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en