There are three possibilities here: Trade sanctions, censorship, and export controls. They are listed in order from least likely to cause a problem to most, although any one of them could be the issue for a given site/country/behavior combination.
The US does have sanctions against Iran, but I'm not sure they'd matter here. Wikipedia sums it up (emphasis mine):
The United States has imposed an arms ban and an almost total economic embargo on Iran, which includes sanctions on companies doing business with Iran, a ban on all Iranian-origin imports, sanctions on Iranian financial institutions, and an almost total ban on selling aircraft or repair parts to Iranian aviation companies. A license from the Treasury Department is required to do business with Iran. ... The U.S. has also begun to designate a number of senior Iranian officials under the Iranian Human Rights Abuses Sanctions Regulations. ... The American view is that sanctions should target Iran's energy sector that provides about 80% of government revenues, and try to isolate Iran from the international financial system. On 6 Feb of 2013 the United States government blacklisted major Iranian electronics producers, Internet policing agencies, and the state broadcasting authority, in an effort to lessen restrictions of access to information for the general public. The sanctions were imposed to target Islamic Republic of Iran Broadcasting, which is responsible for broadcast policy in Iran and oversees production of Iranian television and radio channels. Also targeted were the "Iranian Cyber Police" and the "Communications Regulatory Authority" which the Treasury Department describes as authorities created three years ago to filter Web sites and monitor Internet behavior, while blocking Web sites deemed objectionable by the Iranian government. Currently, under American sanctions laws, any United States property held by blacklisted companies and individuals is impounded, and are prohibited from engaging in any transactions with American citizens.
So, none of the companies you listed can do business with Iran. However, offering Twitter and/or mobile sites in the country, or accepting phone numbers from it, are not things that I'd consider doing business with the government, so it's unlikely that these restrictions are because of the sanctions. It's not impossible that the companies are proactively preventing users from Iran, but it's not required as part of sanctions, which are primarily an economic lever.
On the other hand, censorship by the Iranian government is likely to be the source of at least some of your problems. Iran is known to block Facebook, Twitter, and Google Plus, among others. There's a move in the current government towards permitting some of these sites, but as far as I can tell, it hasn't gone anywhere.
Officially, access to social networks such as Twitter and Facebook is banned — leaving Iranians unable to legally access these sites. Iranians still find ways to access them by illegally downloading virtual private networks to bypass the state’s Internet filtering system.
Reform-minded [Islamic Guidance Minister Ali Jannati] ... has since made attempts to ease Iran’s strict Internet policies, but his efforts have been thwarted by Iran’s conservatives, who worry that their power is being undermined by Western influence.
The censorship wouldn't explain why you're unable to select an Iranian phone number on Twitter, but that could just be Twitter saying "If you block us, clearly there's no need for us to support you."
Unlike the sanctions (and export restrictions) which are imposed from without, censorship would be an internal political lever.
Export controls are similar to trade sanctions, in that they're an external means of applying policy to another country, but they're not designed to actually cause changes in that other country. They're more geared towards preventing certain weapons or technology from reaching the controlled countries. Famously, "strong" cryptographic algorithms were controlled as munitions during the early years of the internet, long after they ceased to actually be trivial to break. It used to be common to find a "US" and "non US" version of software available to download, as an attempt to comply, although I haven't seen that in years.
Wikipedia elaborates on the current status:
As of 2009, non-military cryptography exports from the U.S. are controlled by the Department of Commerce's Bureau of Industry and Security. Some restrictions still exist, even for mass market products, particularly with regard to export to "rogue states" and terrorist organizations. Militarized encryption equipment, TEMPEST-approved electronics, custom cryptographic software, and even cryptographic consulting services still require an export license. Furthermore, encryption registration with the BIS is required for the export of "mass market encryption commodities, software and components with encryption exceeding 64 bits" (75 F.R. 36494). In addition, other items require a one-time review by or notification to BIS prior to export to most countries. For instance, the BIS must be notified before open-source cryptographic software is made publicly available on the Internet, though no review is required. Export regulations have been relaxed from pre-1996 standards, but are still complex. Other countries, notably those participating in the Wassenaar Arrangement, have similar restrictions.
Judging from Google Project Hosting's Terms of Service addendum, it looks like this is likely what you're running into.
When posting Content to the Google Code website (http://code.google.com) or when sharing Content obtained from this website with others, you agree that you are solely responsible for complying with U.S. export control regulations, including the Export Administration Regulations ("EAR"), and all other applicable export and import laws and regulations. These regulations require that all postings of open source encryption code be simultaneously reported by email to the U.S. government. You are responsible for submitting this email report to the U.S. government in accordance with procedures described in: http://www.bis.doc.gov/encryption/PubAvailEncSourceCodeNofify.html and Section 740.13(e) of the EAR. **Users residing in countries on the United States Office of Foreign Assets Control sanction list, including Cuba, Iran, North Korea, Sudan and Syria, may not post or access Content available through the Google Code website. **
Judging from what's actually restricted (or at least, per the Wikipedia summaries), there's no direct requirement for Google, Oracle, and the like to block access from Iran, but doing so provides blanket protection against accidentally violating the export controls and having to make decisions on a case-by-case basis.
Export restrictions like this are a general purpose lever, more intended on preventing the growth of the military or industrial sectors than bringing down what's already there (as with trade sanctions).
As an aside, this page claims that within Iran, the "use of encryption for exchanging information requires a license", which would point back at censorship as the reason (or at least an additional one). I don't know how accurate the site is, though - it hasn't been updated since 2013.