Comments (18)
I'm seeing the same error. Looks like this was added by facebook/react-native@95b9dd3
I've checked the call-site and connectionId is 0. I've also tried making connectionId start from 1.
from react-native-fbsdk.
I completely looked over the other arguments. The issue is that the timeout argument must be set now.
from react-native-fbsdk.
It appears that the callback also can't be null. Work around is to dispatch your request manually instead of calling send()
on it.
FBSDKGraphRequestManager.batchRequests([profileRequest], function() {}, 60);
from react-native-fbsdk.
Should we wait for a fix or should I manually patch it for the moment? ^^
from react-native-fbsdk.
FBSDKGraphRequestManager.batchRequests([profileRequest], function() {}, 60);
suppresses the red error screen, but still getting The operation couldn’t be completed
in Chrome debugger. My code:
var fetchFriendsRequest = new FBSDKGraphRequest((error, result) => {
console.log('FBSDKGraphRequest', error, result);
}, '/me/friends?fields=id,name');
User has been authenticated and authorized user_friends
read permissions.
[email protected]
[email protected]
Edit: sorry -- I think this was from not having FB callback in AppDelegate
.
from react-native-fbsdk.
Doesn't null evaluate to 0?
Where is the connectionID being set?
from react-native-fbsdk.
@ceditoph Sorry, connectionID is correct. The issue is the timeout and callback are null.
from react-native-fbsdk.
@amCloud thanks. Where are you assigning profileRequest? I don't see an example.
from react-native-fbsdk.
Hey I'm working with Ceditoph. We're diving into the source code and can't figure out the proper args to pass in
constructor(callback: (error: ?Object, result: ?Object) => void, graphPath: string, parameters: ?Object, tokenString: ?string, version: ?string, HTTPMethod: ?string) {
this.callback = callback;
this.graphPath = graphPath;
this.parameters = parameters ? parameters : {};
this.tokenString = tokenString;
this.version = version;
this.HTTPMethod = HTTPMethod;
this.graphErrorRecoveryDisabled = false;
}
from react-native-fbsdk.
@ceditoph it is something like this
var profileRequest = new FBSDKGraphRequest((error, result) => {
if (error) {
alert('Error making request.');
} else {
// Data from request is in result
}
}, '/me');
from react-native-fbsdk.
@amccloud thanks! it's working. I don't really like how they have it set up, but the timeout is a solid workaround!
@kent10ou and I will keep at it.
from react-native-fbsdk.
@amccloud so we have it working without getting an error, but how do I grab the result of batch running profileRequest?
Can I use a promise, like .then()?
Thanks again
from react-native-fbsdk.
@amccloud nvm. I see the result from the output of fetchFriends
from react-native-fbsdk.
It's been a while, is this considered a bug?
from react-native-fbsdk.
Yep. This is a bug from my point of view. It prevented us from upgrading from 0.9.
The actual working piece of code:
FBHelper.getFriends = function (success, fail)
{
var fetchFriends = new FBSDKGraphRequest((error, result) => {
if (error)
{
console.log("->FBHelper.getFriends Error: ", error);
fail(error);
}
else
{
success(result);
}
}, '/me/friends?fields=id,name,picture'
);
//fetchFriends.start(); //works before 0.10
FBSDKGraphRequestManager.batchRequests([fetchFriends], function() {}, 60); // works for 0.10 and later
};
Thanks @amccloud for workaround, but for me it took some time to figure out how it should be implemented. :)
from react-native-fbsdk.
New to react-native and fbsdk here but after looking at the source code, assigning a timeout to .start(60)
seemed to be a workaround as well. However, RCTFBSDKGraphRequestManager
doesn't seem to like the fact that the callback is null.
A simple fix to GraphRequest.ios.js/start(timeout: number)
where changing the callback from null
to function() {}
allows us to use the start
function once again.
Feels hackish and I'm not too confident about this so I'm leaving it as a comment here.
from react-native-fbsdk.
Any movement on getting this properly fixed without hacks? The SDK is well behind RN in general, working with v0.8.
from react-native-fbsdk.
This issue has been handled by #44
from react-native-fbsdk.
Related Issues (20)
- Cannot complete login on iOS 13 HOT 5
- CONTRIBUTING.md file: CLA broken link
- Submit permission for Live mode
- Remove deprecated unarchiveObjectWithData methods HOT 1
- SERVER_ERROR: [code] 1349195 [message]: The key hash does not match any stored key hashes. in Real Device (Android) HOT 5
- ShareDialog sharing doesn't work on some Android phones (Huawei p30 pro, Xiaomi redmi 9) HOT 1
- Not able to login with facebook app only in iOS HOT 3
- Expo-facebook does not send Android installation events to the platform, only IOS
- Any plan on upgrading to FB SDK v9 for iOS? HOT 38
- Android cannot compile under 3.0.0 (cannot find symbol FacebookSdk.setDataProcessingOptions) HOT 1
- Sdk update to v9.0 HOT 2
- Subscribe event not fired on Android
- Is there a way to get the download source?
- setAdvertiserTrackingEnabled not found HOT 4
- autoInitEnabled is removed from iOS, should wrap the initialize function
- Some input files use or override a deprecated API
- Missing important data in FB Analytics HOT 1
- Regarding deep link handling
- Yarn no good for the scripts
- Issues with app privacy on the App Store HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-fbsdk.