Facebook error (#100) Could not resolve object at URL" when creating a user owned object - facebook

I'm trying to use the Graph api on Facebook SDK for Unity (package 6.2.2) to create an object for each user to hold data on the levels they have completed.
Using the code:
Dictionary<string, object> dataD = new Dictionary<string, object>();
dataD.Add("title", "Level Score");
Dictionary<string, object> dataS = new Dictionary<string, object>();
dataS.Add("score", score.ToString());
dataS.Add("userid", FB.UserId);
dataD.Add("data", dataS);
Dictionary<string, string> objectData = new Dictionary<string, string>();
objectData.Add("object", Json.Serialize(dataD));
FB.API("me/objects/<namespace>:<objectname>", Facebook.HttpMethod.POST, CreateObjectCallback, objectData);
About 90% of the time the code, replacing the namespace and objectname with the correct names, to create an object works, the app receives a successfull callback and the object is created. The times when it fails the error message in the log reads as:
E/Unity (19602): You are trying to load data from a www stream which had the following error when downloading.
E/Unity (19602): java.io.FileNotFoundException: https://graph.facebook.com/me/objects/<namespace>:<objectname>
E/Unity (19602):
E/Unity (19602): (Filename: Line: 253)
After getting this problem to occur fairly consistantly I attempted to see if I could get any more information by using Facebook's Graph API Explorer and maybe determine if the problem is something in my code but I get the same problem there as well at about the same rate. When it fails in the explorer I can normally send the exact same data straight after the error and it will succeed.
The error code when it decides to fail in the Graph API Explorer is:
{
"error": {
"message": "(#100) Could not resolve object at URL 836692929751565.",
"type": "OAuthException",
"code": 100
}
}
I'm assuming this message means that Facebook has failed to create the object and so is giving me the error that it can't return the object it tried to create but I have been unable to find any information online pertaining to this kind of error.
Is there something I'm missing in the data I'm sending that could cause this or in this situation should I just catch this error and retry creating the object?

From what I could find on the subject it looks like you have some missing registry items. Error 100 is a general error that could mean:
• Access Denied Error 100
• Error 100 Access Denied Windstream
• Yahoo SiteBuilder Error 100
• Error 100 Time Warner Cable
• Microsoft Silverlight Error Code 100
How to fix a numeric error, you have to first know what the numeric code means. Each numeric code will have its own solution that can be done manually or you can use a product that will fix it automatically. To find out what the error code that you are seeing means, you can either refer to your computer’s manual or you can look up the number online and see what the results are.
Some of the more common fixes for a numeric error include:
•Making certain all programs on the computer are updated.
•Making certain that the Windows operating system being used is updated.
•Uninstalling and then reinstalling your Windows operating system.
While these fixes may or may not work for your particular numeric error, they are a start.
http://www.erroranswers.com/troubleshooting/NM_100.php
I hope this helps....

Related

Workday: Put_Customer returning an error

We are using Snaplogic to load records into workday. Currently, extracting customer records from the source and trying to load them into workday using the object Put_Customer of web service Revenue_Management.
I was getting the following error:
But I'm not getting any category information from the source. So, I tried putting the value for Customer_Category_Reference as 1. But I ended up getting the following error.
The documentation for workday is not helpful and this has been a blocker for me for some time now.
Any help will be appreciated.
Update:
Trying to get customer categories using the Get_Customer_Categories object of Revenue_Management web service using Snaplogic. But getting the following error:
Failure: Soap fault, Reason: Processing error occurred. The task submitted is not authorized., Resolution: Address SOAP fault message and retry
Unfortunately I don't have access to a tenant at this time to validate . However it is likely to work based in prior experience . Perhaps you could create a customer in Workday, through the GUI. Then do get customer API call. Note the category reference . Then, use that in your put customer call
If you look at the API documentation, you will find that Put_Customer accepts a WID in the Customer_WWS_Data object. If you search for "Customer Categories" in Workday, you will likely find the report of the same name. Just select the category that you want your newly loaded customers to default to (click on the magnifying class, then on the ellipsis, Integration Ids, View Ids). The Workday ID will appear at the top.
I have not used the Revenue Management API, but my code for creating a position reference in the Compensation API is probably very similar to what you need to do for the Customer Category reference:
public static Position_ElementObjectType getPositionReference(string WID) {
return new Position_ElementObjectType {
ID = new Position_ElementObjectIDType[] {
new Position_ElementObjectIDType {
type = "WID",
Value = WID
}
}
};
}

Unable to generate a temporary class (result=1). error CS0030:

I am trying to paypal express checkout i used https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl.
when i call use
PayPalAPIAASoapBinding paypal = new PayPalAPIAASoapBinding();
i am getting error
Unable to generate a temporary class (result=1). error CS0030:
Cannot convert type
'exprtesscheckoutdemo.com.paypal.sandbox.TupleType[]' to
'paypal.sandbox.TupleType' error CS0029: Cannot implicitly convert
type 'paypal.sandbox.TupleType' to
how to over come this
Just hit this myself when updating to version 119. In your generated Web service file, do a find for [][] and replace all occurrences with []. The bad guy seems to be the merchantDataField in the PaymentDetailsType.
It seems to be a bug in the Microsoft WSDL tools when interacting with services that have "nested nodes with the maxOccurs attribute set to unbounded"; I've encountered it before when interacting with FedEx SOAP APIs as well.

QBO API V3.0: Persistent error today retrieving Tax Rates

We have consistently getting the following error today when using API V3.0 to retrieve TaxRate from QBO:
An application error has occurred while processing your request - Detail: System Failure Error: An unexpected error occurred while accessing or saving your data. Please wait a few minutes and try again. If the problem persists, contact customer support. - Error Code: 10000
Is this a temporary issue with the servers or has something changed in the API ?
Thanks
I tried both the taxrate endpoints(findById and Query) from ApiExplorer and got a successful response.
GetById - https://qb.sbfinance.intuit.com/v3/company/688779980/taxrate/2
Query - https://qb.sbfinance.intuit.com/v3/company/688779980/query?query=select * from TaxRate
Can you please give it a try from ApiExplorer and check if you are hitting the correct endpoints. Otherwise you can raise a support ticket mentioning your company's relamID.
EDIT
Standard BASE URL for V3 - https://quickbooks.api.intuit.com/v3/company
We get the following when we try this call using devkit -
https://quickbooks.api.intuit.com/v3/company/1119166485/query?query=select+*+from+TaxRate&requestid=faf9f5e207134f24930eef40c9b8a21a&
Thanks
There is a bug in .net devkit where IDSquery will not work for count.
You need to use the following lamda function until the fix is in place-
QueryService AccQueryService2 = new QueryService(context);
int accs22= AccQueryService2.Select(c => c).Count();
Refer:
https://intuitpartnerplatform.lc.intuit.com/questions/829658-how-to-select-count-from-invoice-using-idsquery-to-return-int?jump_to=comment_1941998
EDIT:
The team has identified this a bug. They will rectify this in the next release around 1 month from now.

asp.net mvc azure "Error accessing the data store!"

I've started using the AspProviders code to store my session data in my table storage.
I'm sporadically getting the following error:
Description: Exception of type 'System.Web.HttpException' was thrown. INNER_EXCEPTION:Error accessing the data store! INNER_EXCEPTION:An error occurred while processing this request. INNER_EXCEPTION: ConditionNotMet The condition specified using HTTP conditional header(s) is not met. RequestId:0c4239cc-41fb-42c5-98c5-7e9cc22096af Time:2010-10-15T04:28:07.0726801Z
StackTrace:
System.Web.SessionState.SessionStateModule.EndAcquireState(IAsyncResult ar)
System.Web.HttpApplication.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) INNER_EXCEPTION:
Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider.ReleaseItemExclusive(HttpContext context, String id, Object lockId) in \Azure\AspProviders\TableStorageSessionStateProvider.cs:line 484
System.Web.SessionState.SessionStateModule.GetSessionStateItem()
System.Web.SessionState.SessionStateModule.PollLockedSessionCallback(Object state) INNER_EXCEPTION:
Microsoft.WindowsAzure.StorageClient.Tasks.Task1.get_Result()
Microsoft.WindowsAzure.StorageClient.Tasks.Task1.ExecuteAndWait()
Microsoft.WindowsAzure.StorageClient.TaskImplHelper.ExecuteImplWithRetry[T](Func`2 impl, RetryPolicy policy)
Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider.ReleaseItemExclusive(TableServiceContext svc, SessionRow session, Object lockId) in \Azure\AspProviders\TableStorageSessionStateProvider.cs:line 603
Microsoft.Samples.ServiceHosting.AspProviders.TableStorageSessionStateProvider.ReleaseItemExclusive(HttpContext context, String id, Object lockId) in \Azure\AspProviders\TableStorageSessionStateProvider.cs:line 480 INNER_EXCEPTION:
System.Data.Services.Client.DataServiceContext.SaveResult.d__1e.MoveNext()
Anyone run into this? The only useful information I've found is this, which I'm hesitant to do:
If you want to bypass the validation, you can open TableStorageSessionStateProvider.cs, find ReleaseItemExclusive, and modify the code from:
svc.UpdateObject(session);
to:
svc.Detach(session);
svc.AttachTo("Sessions", session, "*");
svc.UpdateObject(session);
from here
Thanks!
So I decided to change this:
svc.UpdateObject(session);
svc.SaveChangesWithRetries();
to this:
try
{
svc.UpdateObject(session);
svc.SaveChangesWithRetries();
}
catch
{
svc.Detach(session);
svc.AttachTo("Sessions", session, "*");
svc.UpdateObject(session);
svc.SaveChangesWithRetries();
}
So, I'll see how that works...
I've encountered this problem as well and after some investigation it seems to happen more often when you have more than one instance and you try to make calls in rapid succession in the same session. (e.g. if you had an auto complete box and making ajax calls on each key press)
This occurs because when you try to access the session data, first of all the web server takes out a lock on that session. When the request is complete, it releases the lock. With the table service provider, it updates this lock status by updating a field in the table. What I think is happening is that Instance1 loads the session row, then Instance2 loads the session row, Instance1 saves down the updated lock status and when Instance2 attempts to save the lock status it gets an error because the object isn't in the same state as when it loaded it (the ETag doesn't match any more).
This is why the fix that you found will stop the error from occurring, because by specifying the "*" in the AttachTo, when Instance2 attempts to save the lock it will turn off ETag checking (and over write the changes made by Instance1).
In our situation we have altered the provider so that we can turn off session for certain paths (the ajax call that was giving us our problems didn't need access to session data, neither did the loading of images) which may be an option for you depending on what is causing your problem.
Unfortunately the TableStorageSessionStateProvider is part of the sample projects and so isn't (as far as I'm aware, but I'll happily be told otherwise) officially supported by Microsoft. It does have other issues, like the fact that it doesn't clean up it's session data once a session expires, so you will end up with lots of junk in the session table and blob container that you'll have to clean up some other way.

facebook connect api "Cannot use string offset as an array in" error

Please help! I have been grappling with this error for days and I cannot for the life of me figure it out. I am using facebook connect and fetching a "contact_email" attribute using their api method users_getInfo.
The issue is that when I execute this PHP file, i get this error: "Cannot use string offset as an array in...". This error specifically refers to this line of code: $firstName=$user_details[0]['contact_email'];
I'm thinking this is because the user_getInfo method is not returning any results... However, the most ridiculous part about all this is that, I can execute the code below several dozens of times in a row SUCCESSFULLY without the above error, BUT THEN randomly without changing ANY code at all, I will suddenly encounter this error, in which case it will begin to give me an error several dozens of times, and then AGAIN without any code change, start executing successfully again.
This odd behavior occurs regardless of the attribute i am fetching.. (contact_email, first_name, last_name, etc.). I am running php 5.2.11. Is there something I'm missing??
Please Help!
include_once 'site/fbconnect/config.php'; //has $api_key and $secret defined.
include_once 'site/facebook-platform/client/facebook.php';
global $api_key,$secret;
$fb=new Facebook($api_key,$secret);
$fb->require_login();
$fb_user=$fb->get_loggedin_user();
$user_details=$fb->api_client->users_getInfo($fb_user,array('last_name','first_name','contact_email'));
$email=$user_details[0]['contact_email'];
$firstName=$user_details[0]['first_name'];
$lastName=$user_details[0]['last_name'];
Using the facebook php client API I was also receiving that error but my error was related to checking if the users are friends using the friends_areFriends php method.
//$results_array = $facebook->api_client->friends_areFriends($fb_user, $selected_friend_uid);
//$answer = $results_array[0]['are_friends'];
I would get this error when I assigned the $result, "Cannot use string offset as an array" and aparently the friends_areFriends method above was failing alot. My solution was to create a for loop that ran that code and then check $answer to see if it was an array using php method is_array() and executing the method call again if it wasn't. My loop was for 10 tries before just letting it fail. In the end, this check was severely degrating the performance of my facebook application. Instead, I removed the friends_areFriends api call alltogather and my facebook app performance was nice and fast again.
You could probably implement a similar feature allowing the method to retry itself if the result is not an array. The problem I think is on facebook's side, sometimes they are flooded and the requests do not complete successfully. I caution you not to retry more than 5 tries though because if you do a forever loop, rest assured they will ban you from the using the Facebook API for flooding it, so be careful.