我正在尝试使用Salesforce中的Tooling API创建自定义字段。首先检查Tooling API,我尝试使用workbench,但它显示以下错误:
JSON解析器错误: 消息:无法从VALUE_STRING值文本反序列化complexvalue的实例,或者请求可能缺少[line:5,column:25]中的必填字段 errorCode:JSON_PARSER_ERROR
以下是我正在使用的JSON正文:
{
"DeveloperName" : "CusField",
"Metadata":
{
"type" : "text",
"description" : "test",
"inlineHelpText" : "testhelp",
"label" : "cus Field",
"required" : false,
"precision" : null,
"length" : 255,
"unique" : false,
"externalId" : false,
"trackHistory" : false
},
"TableEnumOrId" : "Account",
"ManageableState" : "installed"
}
请告诉我身体有什么问题? 在此先感谢。
答案 0 :(得分:0)
身体有些毛病。
func showCredentials() {
let credential = FacebookAuthProvider.credential(withAccessToken: FBSDKAccessToken.current().tokenString)
Auth.auth().signInAndRetrieveData(with: credential) { (AuthDataResult, error) in
if error != nil {
print("Something went wrong with our Facebook User: ", error)
return
}
FBSDKGraphRequest(graphPath: "/me", parameters: ["fields": "id, name, email"]).start {
(connection, graphResult, error) in
if error != nil {
print("Failed to Start Graph Request:", error)
return
}
print(graphResult)
let facebookDetail = graphResult as! NSDictionary
let userID = facebookDetail["id"]
let fullName = facebookDetail["name"]
let email = facebookDetail["email"]
let providerName = "Facebook"
let userValues = (["Email": email, "Full Name": fullName, "UID": userID, "Provider":providerName])
let databaseRef = Database.database().reference()
let key = databaseRef.child("node").childByAutoId().key ?? ""
let childUpdates = ["/Users/\(userID))/": userValues]
databaseRef.updateChildValues(childUpdates)
print(userID!)
print(fullName!)
let firebaseID = Auth.auth().currentUser?.uid
print(firebaseID!)
DispatchQueue.main.async {
print("Successfuly logged in with our Facebook User: ", AuthDataResult)
self.performSegue(withIdentifier: "FacebookSegue", sender: self)
}
}
}
}
这是一个工作岗位:
Text