You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/profiles.rs
+12-2Lines changed: 12 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ use serde::Deserialize;
4
4
5
5
#[derive(Deserialize,Debug)]
6
6
pubstructThreadsUserProfile{
7
-
pubid:String,
7
+
pubid:Option<String>,
8
8
pubusername:Option<String>,
9
9
pubname:Option<String>,
10
10
pubthreads_profile_picture_url:Option<String>,
@@ -36,7 +36,7 @@ pub async fn get_profile_info(
36
36
debug!("failed to retrieve Threads user profile: {:#?}", error);
37
37
// @TODO consider using Err instead of Ok
38
38
Ok(ThreadsUserProfile{
39
-
id:String::from(""),
39
+
id:None,
40
40
username:None,
41
41
name:None,
42
42
threads_biography:None,
@@ -64,6 +64,16 @@ mod tests {
64
64
65
65
let res = get_profile_info(None, token).await;
66
66
67
+
/*
68
+
* @TODO test against invalid access_token, which results in this response
69
+
* {
70
+
* message: "Error validating access token: The session has been invalidated because the user changed their password or Facebook has changed the session for security reasons.",
0 commit comments