ianlee-dev / facebook-java-api

Automatically exported from code.google.com/p/facebook-java-api
0 stars 0 forks source link

users.setStatus by specifying userId error #81

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Whenever I try to set the status by specifying a userId I get an invalid 
parameter error.
Looking at the source code the users_setStatus( String newStatus, boolean 
clear, boolean statusIncludesVerb, Long userId ) method incorrectly 
specifies the uid parameter as "true" instead of passing the actual userId

Original issue reported on code.google.com by tamer...@gmail.com on 7 Aug 2008 at 4:52

GoogleCodeExporter commented 8 years ago
I want to back up tamer316, I have verified this bug. I see the exact same is 
the
case for my application as well. This seems to be an easy thing to fix, just 
some
transposed variables I guess in the source.

Original comment by nicholas...@gmail.com on 12 Aug 2008 at 4:45

GoogleCodeExporter commented 8 years ago
I have also verified this bug, when switching to use the users_setStatus method 
call
that takes the user id parameter, I also get invalid parameter. I also agree 
that the
"true" is incorrectly being set instead of the user id in the above mentioned 
method. 

Original comment by chikinl...@gmail.com on 12 Aug 2008 at 4:53

GoogleCodeExporter commented 8 years ago
Index: src/java/com/facebook/api/FacebookRestClient.java
===================================================================
--- src/java/com/facebook/api/FacebookRestClient.java   (revision 277)
+++ src/java/com/facebook/api/FacebookRestClient.java   (working copy)
@@ -3948,7 +3948,7 @@
        if ( statusIncludesVerb ) {
            params.add( new Pair<String,CharSequence>( "status_includes_verb", "true" ) );
        }
-       params.add( new Pair<String,CharSequence>( "uid", "true" ) );
+       params.add( new Pair<String,CharSequence>( "uid", userId.toString() ) );

        return users_setStatus( FacebookMethod.USERS_SET_STATUS_NOSESSION, params );
    }

Original comment by sunilgar...@gmail.com on 5 Sep 2008 at 6:35

GoogleCodeExporter commented 8 years ago
thank you for tracking it down. I'll checking in the fix soon.

Original comment by fern...@gmail.com on 6 Sep 2008 at 12:30