Gmail annotation promo tab not showing the image - gmail-promo-tab

I've been using the gmail promotab annotation for some time, it all used to work fine, however, the image stopped showing recently. It only does show the company logo, subject line, the amount of % off and the discount code, but not the image. When testing the code here: https://developers.google.com/gmail/promotab/overview the preview looks perfect, including the image and all, but in the actual Gmail promo inbox the image is not there. I am not sure how to solve this. Would it help if I send the actual email again to schema.whitelisting+sample#gmail.com?
Below is the schema code used (in the tag):
[{
"#context": "http://schema.org/",
"#type": "Organization",
"name": "XXXXXXX",
"logo": "XXXXXXX"
},{
"#context": "http://schema.org/",
"#type": "EmailMessage",
"subjectLine": "XXXXXXX"
},{
"#context": "http://schema.org/",
"#type": "DiscountOffer",
"description": "10% OFF",
"discountCode": "XXXXXXX",
"availabilityStarts": "2022-07-26T08:00:00+01:00",
"availabilityEnds": "2022-07-27T08:00:00+01:00"
},{
"#context": "http://schema.org/",
"#type": "PromotionCard",
"image": "XXXXXXX"
}]
</script> ```

Related

How can I un-spam my domain while testing mailgun webhooks?

I managed to create all that code that creates mailgun webhooks plus many other things like record responses to local database.
During my tests I send emails to yahoo & gmail and of course - as you expected - I pressed a couple of times the spam button at my tablet's yahoo app to test and verify the events recorded with my code.
My problem is that now when I send to that yahoo address from the domain under test the email never reaches my inbox and at the logs I read:
4.7.0 [TSS04] Messages from 159.135.140.82 temporarily deferred due to user complaints - 4.16.55.1; see https://postmaster.verizonmedia.com/error-codes
See what mailgun reports:
{
"severity": "temporary",
"tags": [
"issue 1",
"newsletter",
"2020"
],
"mailing-list": {
"list-id": "xyz101.mail.mysite.com",
"sid": "1634752",
"address": "xyz101#mail.mysite.com"
},
"storage": {
"url": "https://storage.eu.mailgun.net/v3/domains/mail.mysite.com/messages/AgEFucSTB0eaifXAHzlNKbRoSH0IddfpZA==",
"key": "AgEFucSTB0eaifXAHzlNKbRoSH0IddfpZA=="
},
"delivery-status": {
"tls": true,
"mx-host": "mx-eu.mail.am0.yahoodns.net",
"attempt-no": 1,
"description": "",
"session-seconds": 0.39575695991516113,
"retry-seconds": 600,
"code": 421,
"message": "4.7.0 [TSS04] Messages from 159.135.140.82 temporarily deferred due to user complaints - 4.16.55.1; see https://postmaster.verizonmedia.com/error-codes",
"certificate-verified": true
},
"recipient-domain": "yahoo.co.uk",
"id": "D5IqK77PRA29RvULyzXLsw",
"campaigns": [],
"reason": "generic",
"user-variables": {
"id": "15"
},
"flags": {
"is-routed": false,
"is-authenticated": true,
"is-system-test": false,
"is-test-mode": false
},
"log-level": "warn",
"timestamp": 1604915932.781863,
"envelope": {
"transport": "smtp",
"sender": "sales#mail.mysite.com",
"sending-ip": "159.135.140.82",
"targets": "blah-blah-blah#yahoo.co.uk"
},
"message": {
"headers": {
"to": "cent C. <blah-blah-blah#yahoo.co.uk>",
"message-id": "20201109095852.1.8EC4631A16DA1C10#mail.mysite.com",
"from": "mysite <sales#mail.mysite.com>",
"subject": "test_MailGunHttpClient_send_from_real_domain_with_tags_with_tracking_opens_and_clicks_with_unsubscribe_enabled_and_with_recipient_variables_visible_to_webhooks_to_mailing_list_of_access_type_readonly"
},
"attachments": [],
"size": 2130
},
"recipient": "blah-blah-blah#yahoo.co.uk",
"event": "failed"
}
This message eventually will become severity: "permanent".
Any idea how I can reverse this behavior at yahoo servers not accepting my emails(*)?
(*) For another domain I setup at Mailgun I inspect deliverability as I haven't clicked the spam button for emails landed from that domain
Looks like your actions have had some repercussions, emails from one of our accounts using the same IP are blocked by Yahoo, Aol etc. And it started for no reason related to us, the recipients or the content of the emails (it is a paid newsletter).

How can we get the phone number with Google OAuth API and facebook API used for social login?

How can we get the phone number with Google OAuth API login.
I am using scopes as
'scope' : 'https://mail.google.com https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/plus.login '
and the request is as
var request = gapi.client.plus.people.get({'userId': 'me'});
Is there any scope we can use to get it.
I am getting response as with no sight of phone number :
{
"kind": "plus#person",
"etag": "\"vPymIyv1bT9LfmoUujkgN2yLMK0\"",
"gender": "male",
"emails": [
{
"value": "XXX#gmail.com",
"type": "account"
}
],
"urls": [
{
"value": "http://picasaweb.google.com/XXX",
"type": "otherProfile",
"label": "Picasa Web Albums"
}
],
"objectType": "person",
"id": "4354354334435465",
"displayName": "XXXXX YYYY",
"name": {
"familyName": "XXX",
"givenName": "YYYYY"
},
"url": "https://plus.google.com/1100335464643327",
"image": {
"url": "https://lh3.googleusercontent.com/-fgsdgfgU9-jU/AAAAAAAAAAI/AAAAAAAADkM/fgffdgdkM/photo.jpg?sz=50",
"isDefault": false
},
"isPlusUser": true,
"language": "en",
"ageRange": {
"min": 21
},
"circledByCount": 59,
"verified": false
}
if you want to get user phone numbers you have to have authorization from the user: see the following info page : https://developers.google.com/admin-sdk/directory/v1/guides/authorizing
ask the user for this scope of authorization :
https://www.googleapis.com/auth/admin.directory.user.readonly
after you have authorization from user run the folowing request :
GET https://www.googleapis.com/admin/directory/v1/users/userKey
the response will be a JSON response formatted as followed:
https://developers.google.com/admin-sdk/directory/v1/reference/users#resource
one of the attributes is phone list.
hope it helps.
You can use google's people API to get the user's phone numbers.
To explore more you can try yourself.
Steps to explore:
Visit this link.
Select https://www.googleapis.com/auth/user.phonenumbers.read permission in People API v1 section
Click on Authorize API
Choose the account to log in
Grant permission
Click Exchange authorization code for tokens
Enter https://people.googleapis.com/v1/people/138262720636785143353?personFields=phoneNumbers,emailAddresses link, make sure you replace the UID
Click on send request to see the response

get profile picture from google plus

I have used google app engine with django application. I have been using the user api from google to login in my website and also getting the current user email address from that, but i have to get profile picture which is uploded on the google plus account.
I am getting their profile picture using,
<img src="https://plus.google.com/s2/photos/profile/<user_id>?sz=100" width="100" height="100">
in google api.
User class also provides user_id but I cannot get their profile picture using that user_id.
<user_id> and user_id of user class of Google API is different.
How to get the profile picture in my application?
The way to do it is to use the google+ api here: https://developers.google.com/apis-explorer/#p/plus/v1/plus.people.get?userId=me&_h=2&
This is the request to pull the image for the currently authenticated user.
GET https://www.googleapis.com/plus/v1/people/me?key={YOUR_API_KEY}
You'll get a json response like this and it's really easy to parse that and pull out the image->url value to display.
{
"kind": "plus#person",
"etag": "\"XxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx\"",
"gender": "male",
"emails": [
{
"value": "jbrahy#XxXxXxXx.com",
"type": "account"
}
],
"objectType": "person",
"id": "XxXxXxXxXxXxXxXxXxXxXxXx",
"displayName": "John Brahy",
"name": {
"familyName": "Brahy",
"givenName": "John"
},
"url": "https://plus.google.com/XxXxXxXxXxXxXxXxXxXxXxXx",
"image": {
"url": "https://lh3.googleusercontent.com/XxXxXxXx/XxXxXxXx/XxXxXxXx/XxXxXxXx/photo.jpg?sz=50"
},
"isPlusUser": true,
"language": "en",
"circledByCount": 2,
"verified": false,
"cover": {
"layout": "banner",
"coverPhoto": {
"url": "https://lh5.googleusercontent.com/XxXxXxXx/XxXxXxXx/XxXxXxXx/XxXxXxXx/XxXxXxXx/Green%2BGrass.jpg",
"height": 240,
"width": 420
},
"coverInfo": {
"topImageOffset": 0,
"leftImageOffset": 0
}
},
"domain": "XxXxXxXx-x.com"
}
If you are asking the about the ids...
My GoogleID according to user_id() is xxx8005350796570706xx and my Google Plus profile ID is 102445631084043565507 which are totally different
You need to ask the user for his G+ profile or authenticate him via oAth2.0 to get permissions to read his profile.
Also if you have his email address you could use GAvatar.

How to get the cover photo of each facebook album using facebook android sdk

I am using facebook android sdk for accessing facebook albums. I've got the json that contains all the albums object. Want to get the cover photo of each album.
This is the object:
"id": "3486732467234",
"from": {
"name": "Persons Name",
"id": "Persons ID"
},
"name": "Vacation",
"location": "City",
"link": "https://www.facebook.com/album.php?fbid=434235&id=324343&aid=2430",
"cover_photo": "3489234432",
"privacy": "everyone",
"count": 60,
"type": "normal",
"created_time": "2007-06-03T23:01:16+0000",
"updated_time": "2011-03-18T19:46:43+0000",
"can_upload": true
}
How can i get the cover_photo image with this value "cover_photo": "3489234432" ??
I am able to get this value in a string..
Thanks
just request photo info by photoID, use this API:
https://graph.facebook.com/photoID
Don't forget the access_token

get Post like count with Facebook AP

i am trying to retrieve a facebook POSTs information (ie: LIKE count) using the facebook API
The URL which used to work was in this format:
https://graph.facebook.com/?ids=[AUTHOR_ID]_[POST_ID]
(author and post ID omitted on purpose)
Now it returns a false data feed. Has the URL structure to retrieve POST information changed?
With October 2013 Breaking Changes, likes.count field is no longer available in the feed.
You need to make a call for each POST_ID with the summary field enabled.
https://graph.facebook.com/POST_ID/likes?summary=true&access_token=XXXXXXXXXXXX
There will be a "summary" element with a "total_count" field.
Nope, that still works for me - just tested with one of my posts:
"id": "<SNIP>",
//removed most fields
"actions": [
{
"name": "Comment",
"link": "https://www.facebook.com/X/posts/Y"
},
{
"name": "Like",
"link": "https://www.facebook.com/X/posts/Y"
}
],
"type": "photo",
"status_type": "added_photos",
"object_id": "SNIP",
"application": {
"name": "Facebook for Android",
"namespace": "fbandroid",
"id": "350685531728"
},
"created_time": "2012-10-12T06:52:10+0000",
"updated_time": "2012-10-12T07:48:34+0000",
"likes": {
"data": [
// four likers' details
],
"count": 28
},
//snip
Check you still have read_stream Permission from your user, that the post hasn't been deleted, etc