dinasaif / socialauth-android

Automatically exported from code.google.com/p/socialauth-android
0 stars 0 forks source link

Unable to get twitter friends list through socialauth-android-2.1.jar #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.download and replace the socialauth-android-2.1.jar
2.When click the friends button, unable to get twitter friends list.
3.It throws error.

What is the expected output? What do you see instead?

Need to get twitter friends list.

What version of the product are you using? On what operating system?
socialauth-2.3.jar
socialauth-android-2.1.jar

Please provide any additional information below.

I got below error.
04-16 10:17:05.695: I/TwitterImpl(14690): Fetching contacts from 
http://api.twitter.com/1/friends/ids.json?screen_name=sgm_friends&cursor=-1
04-16 10:17:05.700: D/SocialAuthAdapter(14690): Contact list not Received
04-16 10:17:05.700: W/System.err(14690): 
org.brickred.socialauth.exception.SocialAuthException: Failed to retrieve the 
contacts from 
http://api.twitter.com/1/friends/ids.json?screen_name=sgm_friends&cursor=-1
04-16 10:17:05.700: W/System.err(14690):    at 
org.brickred.socialauth.provider.TwitterImpl.getContactList(TwitterImpl.java:287
)
04-16 10:17:05.705: W/System.err(14690):    at 
org.brickred.socialauth.android.SocialAuthAdapter.getContactList(SocialAuthAdapt
er.java:688)
04-16 10:17:05.705: W/System.err(14690):    at 
org.brickred.customui.CustomUI.Events(CustomUI.java:199)
04-16 10:17:05.705: W/System.err(14690):    at 
org.brickred.customui.CustomUI$ResponseListener$1.onClick(CustomUI.java:137)
04-16 10:17:05.705: W/System.err(14690):    at 
com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertControll
er.java:934)
04-16 10:17:05.705: W/System.err(14690):    at 
android.widget.AdapterView.performItemClick(AdapterView.java:298)
04-16 10:17:05.705: W/System.err(14690):    at 
android.widget.AbsListView.performItemClick(AbsListView.java:1283)
04-16 10:17:05.705: W/System.err(14690):    at 
android.widget.AbsListView$PerformClick.run(AbsListView.java:3074)
04-16 10:17:05.705: W/System.err(14690):    at 
android.widget.AbsListView$1.run(AbsListView.java:4147)
04-16 10:17:05.705: W/System.err(14690):    at 
android.os.Handler.handleCallback(Handler.java:615)
04-16 10:17:05.705: W/System.err(14690):    at 
android.os.Handler.dispatchMessage(Handler.java:92)
04-16 10:17:05.705: W/System.err(14690):    at 
android.os.Looper.loop(Looper.java:137)
04-16 10:17:05.705: W/System.err(14690):    at 
android.app.ActivityThread.main(ActivityThread.java:4898)
04-16 10:17:05.705: W/System.err(14690):    at 
java.lang.reflect.Method.invokeNative(Native Method)
04-16 10:17:05.710: W/System.err(14690):    at 
java.lang.reflect.Method.invoke(Method.java:511)
04-16 10:17:05.710: W/System.err(14690):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1008)
04-16 10:17:05.710: W/System.err(14690):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:775)
04-16 10:17:05.710: W/System.err(14690):    at 
dalvik.system.NativeStart.main(Native Method)
04-16 10:17:05.710: W/System.err(14690): Caused by: 
org.brickred.socialauth.exception.SocialAuthException: 
android.os.NetworkOnMainThreadException
04-16 10:17:05.710: W/System.err(14690):    at 
org.brickred.socialauth.util.HttpUtil.doHttpRequest(HttpUtil.java:154)
04-16 10:17:05.710: W/System.err(14690):    at 
org.brickred.socialauth.util.OAuthConsumer.send(OAuthConsumer.java:406)
04-16 10:17:05.710: W/System.err(14690):    at 
org.brickred.socialauth.util.OAuthConsumer.httpGet(OAuthConsumer.java:280)
04-16 10:17:05.710: W/System.err(14690):    at 
org.brickred.socialauth.oauthstrategy.OAuth1.executeFeed(OAuth1.java:121)
04-16 10:17:05.710: W/System.err(14690):    at 
org.brickred.socialauth.provider.TwitterImpl.getContactList(TwitterImpl.java:285
)
04-16 10:17:05.710: W/System.err(14690):    ... 17 more
04-16 10:17:05.710: W/System.err(14690): Caused by: 
android.os.NetworkOnMainThreadException
04-16 10:17:05.715: W/System.err(14690):    at 
android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1118)
04-16 10:17:05.715: W/System.err(14690):    at 
java.net.InetAddress.lookupHostByName(InetAddress.java:385)
04-16 10:17:05.715: W/System.err(14690):    at 
java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
04-16 10:17:05.715: W/System.err(14690):    at 
java.net.InetAddress.getAllByName(InetAddress.java:214)
04-16 10:17:05.715: W/System.err(14690):    at 
libcore.net.http.HttpConnection.<init>(HttpConnection.java:70)
04-16 10:17:05.715: W/System.err(14690):    at 
libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
04-16 10:17:05.715: W/System.err(14690):    at 
libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:340)
04-16 10:17:05.715: W/System.err(14690):    at 
libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:87)
04-16 10:17:05.715: W/System.err(14690):    at 
libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
04-16 10:17:05.715: W/System.err(14690):    at 
libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:315)
04-16 10:17:05.715: W/System.err(14690):    at 
libcore.net.http.HttpEngine.connect(HttpEngine.java:310)
04-16 10:17:05.715: W/System.err(14690):    at 
libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:289)
04-16 10:17:05.720: W/System.err(14690):    at 
libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:239)
04-16 10:17:05.720: W/System.err(14690):    at 
libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:80)
04-16 10:17:05.720: W/System.err(14690):    at 
org.brickred.socialauth.util.HttpUtil.doHttpRequest(HttpUtil.java:152)
04-16 10:17:05.720: W/System.err(14690):    ... 21 more

Original issue reported on code.google.com by rvganesh...@gmail.com on 16 Apr 2013 at 4:58

GoogleCodeExporter commented 8 years ago
Hi , 

Please use the new custom-ui example , u can check from wiki. the 
implementation is changed fro async request. you can still yse the old 
implemenation and it will work till sdk 2.3 but on 4.0 you need to handle it in 
background thread.

Original comment by vineet.a...@3pillarglobal.com on 22 Apr 2013 at 4:42

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
hi did your issue solved

Original comment by vineet.a...@3pillarglobal.com on 25 Apr 2013 at 9:29

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi.. Sorry for late reply.. now its working fine.. thank u so much..

Original comment by rvganesh...@gmail.com on 29 Apr 2013 at 6:10

GoogleCodeExporter commented 8 years ago
thanks

Original comment by vineet.a...@3pillarglobal.com on 30 Apr 2013 at 5:17