BEVERLY HILLS, Calif. — President Trump engaged in a long-distance debate over Iran with one of his closest allies on Tuesday as Republicans sought to influence the administration’s response to the attacks on oil facilities in Saudi Arabia over the weekend.

Mr. Trump, who was in California for campaign fund-raising events, lashed out on Twitter at that ally, Senator Lindsey Graham, Republican of South Carolina, for calling the president’s approach to Iran too weak. But Mr. Trump declined to be drawn into repeating his more combative threats against Tehran while awaiting a definitive intelligence assessment about responsibility for the attack.

The president was responding to a series of tweets by Mr. Graham, who has long been one of the more hawkish members of the Republican conference. “The measured response by President @realDonaldTrump regarding the shooting down of an American drone was clearly seen by the Iranian regime as a sign of weakness,” Mr. Graham wrote.

As his motorcade traveled to Beverly Hills for a fund-raising dinner, Mr. Trump fired back: “No Lindsey, it was a sign of strength that some people just don’t understand!”