The Spell Sniper feat gives you a cantrip among other things:
You learn one cantrip that requires an attack roll
Does Green-Flame Blade fits this requirement? No direct attack roll is used as in Thorn Whip, but still an attack roll is necessary for the cantrip to work.
So the question is, if you can learn GFB with this feat, not if its range is doubled.
Best Answer
Yes, You can learn Green Flame Blade with Spell Sniper
We know from Jeremy Crawford's tweet that
At least as far as increasing the range is concerned. Spell Sniper specifically says:
Since Green Flame Blade is confirmed to work with the range increase of spell sniper, then Green Flame Blade must be a spell and it must require an attack roll. If it didn't meet these requirements, it wouldn't be valid for a range increase.
The cantrip that you learn from the spell, as it has been pointed out, is:
Well, Green Flame Blade is a cantrip. And we know that it requires an attack roll, because it fulfills that same requirement for the range increase in the other benefit. And Green Flame Blade is on several of the allowed class spell lists. Since there are no other restrictions, Green Flame Blade meets all requirements to be learned from this feat.