We can spend an inordinate amount of time splitting hair over this. Most of the so called 'disagreement' is over semantics.
If Morocco sought diplomatic relationship with US in 1777, that was a year or less after its independence. And if Tangier remains the oldest Embassy building owned by US and is now on the national registry of historic sites, one outside of US on a foreign site, the existence of Embassy, in diplomatic relationship/parlance is one of the first tests of establishing relationship. While Emissaries, Consular and other foreign officials signal relationship, the existence of an Embassy with an Ambassador, means more and that is where the test is measured. While France may have played a significant role in early America coming into existence, America and France never exchanged Ambassadors but had Envoys: John Adams was seen and noted in that role. Morocco had an American Ambassador before any European country had one.
And mark you, France’s support of US was by default and not by design; France never liked England and always sought to be opposite her in any dispute/issue as a way to register its dislike. That in part fueled the early support and donation of Lady of Liberty at Ellis Island. For your information, the Gavel used in US Senate was donated by India, after the first one broke and not by an European nation. Many nations have played significant roles in the making and coming of America, but some nations have fallen short in espousing its contributions, and as a result, by default, mainly European ones appear as the only ones that made significant contributions.
If you are interested in more facts, here are some reads:
1421: The Year China Discovered America by Gavin Menzies
1776: John Adams by David McClullough
Alexander Hamilton by Ron Chernow
African Squadron; The US Navy and The Slave Trade by Donald L. Canney.
To buttress the argument not in a manner to seek your approval but to lay facts, the Barbary State of North Africa, made up of Algiers, Tripoli, Tunis and Morocco, influenced American shipping in the Mediterranean as demands for tributes [bribes] were made by the states. To ensure the European- Mediterranean trade was not attacked, the nations made huge cash payments, seen as extortion but an acceptable part of the cost of commerce in that part of the world. For example, France paid $200,000 a year to Algiers, Britain paid about $280,000. In the past years, American ships came under the protection paid for by the British. But after 1776, America sought protection no longer pertained nor would France foot the cost of guaranteeing respect for the American flag off the shores of North Africa.
John Adams as he was canvassing support for American goods and respect for the new nation, its traditional allies: the Europeans were backing down. He was advised to approach the Barbary States. A Treaty of Peace was sought with Tripoli. Morocco however presented the best option for America to have a strong relationship in the region, therefore, the establishment of Tangier as the US Embassy location. John Adams in respect to the Muslim world was noted as saying: 'A war between Christian and Christian was mild, prisoners were treated with humanity; but, warned His Excellency, a war between Muslim and Christian could be horrible'. Modern day example, Iraq: Does history teach anyone anything?
If you try to find the answer to what I wrote in a text book, you will not be fortunate as text books are written to promote certain knowledge. Often what suits the author. Many text books are not allowed in US schools for fear that facts or better, their promoted perspectives would be challenged and changed; so let mostly common street 'history' persist. Please check out a book by J A Rogers; Africa's Gift to America, and you will throw away many things you were told or impressed by.
Imperial power or not, most nations are disadvantaged because they do not have the literal resources to sell themselves or tell their stories. In the world, it does appear whoever blows their trumpet the loudest is seen and often by undue design, acknowledged as the 'first'. In my years living in US, I often joke to my audiences that one of my best unknown accomplishments, is that I Discovered Dallas. They often ask how so or how come? And my answer, I am the first from my family to show up in Dallas, and as a result, I discovered it. Got the picture?
Historical facts are better gleaned from diverse subjects than typical text books. Economic-Geography, History Economic Development, are some of the subject matter sources that often make text book facts, questionable. If you read 1421 by Gavin Menzies, you will question many things; just like if you read 'An Eye for An Eye, by John Sack, you will question common facts held about the holocaust.
The knowledge that I bring to a discourse is both academic, professional and practical. My first contact with US State Department, was in the mid 90s, when my firm was considered to go to North Africa and provide real estate consulting service and later in 2001, after 9-11, I was one of nine firms, the only 'black', considered to do site selection for new Embassies for Department of State. Initial assignments sought my fee for sites in Sri Lanka, Mexico and Togo.