I have the following fetch function in my react native project to return a blob image from MS Graph, the return works but i cannot seem to display the blob as an image.
//Blob Picture
fetch('https://graph.microsoft.com/v1.0/me/photo/$value', {
headers: { 'Authorization': "Bearer " + accessToken },
})
.then((response) => {
// console.log(response);
this.setState({ BlobImage: response});
})
.catch((error) => {
console.error(error);
});
I have the following fetch function in my react native project to return a blob image from MS Graph, the return works but i cannot seem to display the blob as an image.
//Blob Picture
fetch('https://graph.microsoft.com/v1.0/me/photo/$value', {
headers: { 'Authorization': "Bearer " + accessToken },
})
.then((response) => {
// console.log(response);
this.setState({ BlobImage: response});
})
.catch((error) => {
console.error(error);
});
Then i wish to display the image like so:
<Image source={{uri: BlobImage}} style={{ height: 200, width: null, flex: 1 }}/>
I’ve tried everything to get this working but am not having any luck.